<$set name="username" value={{$:/status/UserName}} emptyValue="(anonymous)">
<$set name="target" filter="[<currentTiddler>]">
<$action-createtiddler $basetitle={{{ [[Comment by ']addsuffix<username>addsuffix[' on ']addsuffix<currentTiddler>addsuffix[']] }}} role="comment" list=<<target>> text="" edit-mode="yes"/>
</$set>
</$set>The filter is all one line which makes it very difficult to read and print.Newlines in filters do not work, however if you passed fieldname="value" pairs to the create new tiddler action you could use newlines. That is do not use the triple curly braces. You may need more set widgets, but it would read better.
Alternatively you could define the filter in a (global) macro and place it in the create tiddler using the subfilter operator, after all you may want to use it more than once.
You could even move set widgets to macros if they define reusable variables, this would provide a tiddler of sharable settings and much simpler new tiddler code.
That should give you multiple avenues to write readable self documenting code.
I assume you are wrapping this in a trigger widget such as a button?
Regards
Tony
Joe,Newlines in filters do not work, however if you passed fieldname="value" pairs to the create new tiddler action you could use newlines. That is do not use the triple curly braces. You may need more set widgets, but it would read better.
Joe,Newlines in filters do not work, however if you passed fieldname="value" pairs to the create new tiddler action you could use newlines. That is do not use the triple curly braces. You may need more set widgets, but it would read better.
Alternatively you could define the filter in a (global) macro and place it in the create tiddler using the subfilter operator, after all you may want to use it more than once.
You could even move set widgets to macros if they define reusable variables, this would provide a tiddler of sharable settings and much simpler new tiddler code.
That should give you multiple avenues to write readable self documenting code.
I assume you are wrapping this in a trigger widget such as a button?
Regards
Tony
<$set name="username"value={{$:/status/UserName}}emptyValue="(anonymous)"><$set name="target"filter="[<currentTiddler>]"><$action-createtiddler$basetitle={{{ [[Comment by ']]+[addsuffix<username>]+[addsuffix[' on ' ]]+[addsuffix<currentTiddler>]+[addsuffix[']] }}}role="comment"list=<<target>>text=""edit-mode="yes"/></$set></$set>But this does not work - so what's gone wrong? can't I have newlines in filters
This page says I canCan anybody suggest a formatting that works and that would look nice ina printed media.Cheers/Joe
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d5ce8e72-1165-41b9-b398-b6f6becec82d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.