I am dabbling in TiddlyWiki again :) Two questions.
1) Custom fields - I followed the first two instructions at
<http://www.tiddlywiki.org/wiki/Getting_started_with_custom_tiddler_fields>
(editing EditTemplate and ViewTemplate), and the field appears both in
view and edit mode. However the text I enter in the field is not saved
with the tiddler and never actually shows up in view mode (just the
label). Any ideas?
I am interested in quickly mocking up something kind of database-like.
I imagine each entry (tiddler) having attributes such as type, theme
and location. I could mark all these attributes through tags, possibly
using prefixes like loc:foo, theme:bar etc... but I am wondering if it
is better to separate those things into three separate fields (or
three separate tag fields?! would that be possible? seems like it
might be).
Say I were to use prefixes with tags; then I want to be able to list
all tiddlers that miss a particular prefixed tag. Is that possible?
Like 'list all tiddlers that have no tag with a loc: prefix'
2) Would any server-side implementation of TW result in smaller page
sizes? Or is the benefit just in multiple editors over http & (a
dubious benefit) storage in a database?
thanks,
Brianna
--
They've just been waiting in a mountain for the right moment:
http://modernthings.org/
At this point, I don't think any of the server-sides provide on-demand
loading (as that requires certain adjustments in the client-side
TiddlyWiki core).
This will be tackled at some point, but it's not a trivial issue to solve.
However, the IncludePlugin might be something to look into:
http://www.tiddlywiki.org/wiki/On-demand_Loading
-- F.
Brilliant, thanks. I updated the examples on the wiki page.
Thanks also to FND for your answer re: server side wikis.
cheers,
Now I want to only display the label text in ViewTemplate, if the
field actually has some value.
I installed <http://mptw.tiddlyspot.com/#HideWhenPlugin> and tried this:
<div class="fieldurl" macro="hideWhen tiddler.fieldurl == ''">Link:
<span macro="view fieldurl"></span></div>
but still the text "Link:" always displays, even when the field is empty.
What should I have instead of <code> tiddler.fieldurl == '' </code> ?
Try this:
t.fields["url"] == ""
HTH.
-- F.
Syntax error.
Really - double quotes? This expression is already in a double quotes string.
Is 't' the same as 'tiddler'?
This succeeds in hiding the field permanently, not just when it is empty.
Oh, I hadn't considered that - try single quotes then.
> Is 't' the same as 'tiddler'?
Sorry, my bad - that's supposed to be "tiddler".
If none of this works, could you provide us with a simple demo please
(e.g. on Tiddlyspot)?
-- F.
My housemate got it working, seems to be a matter of getting the right
nesting of single and double quotes. :)
<div class="fieldurl" macro='hideWhen tiddler.fields["fieldurl"] ==
""'>Link: <span macro="view fieldurl"></span></div>
Brianna
Good.
By the way, it doesn't matter whether you nest single quote inside
double quotes or vice versa:
"foo 'bar' baz"
'foo "bar" baz'
-- F.