{{This is a task that is not an existing tiddler||task}}
{{This is another one||task}}
{{And a third||task}}
\define addThis() [[$(new)$]] $(old)$
<$set name="current" value=<<currentTiddler>> >
<$list filter="[[ToDo]!tag{!!title}]">
<$tiddler tiddler=<<current>> >
<$set name="old" value={{ToDo!!tags}}>
<$set name="new" value={{!!title}}>
<$button set="ToDo!!tags" setTo=<<addThis>> >{{!!title}}</$button>
</$set>
</$set>
</$tiddler>
</$list>
<$list filter="[[ToDo]tag{!!title}] +[[done]!tag{!!title}]">
<$tiddler tiddler=<<current>> >
<$checkbox tiddler="done" tag={{!!title}}>{{!!title}}</$checkbox>
</$tiddler>
</$list>
<$list filter="[[ToDo]tag{!!title}] +[[done]tag{!!title}]">
<$tiddler tiddler=<<current>> >
<$checkbox tiddler="done" tag={{!!title}}>~~{{!!title}}~~</$checkbox>
</$tiddler>
</$list>
</$set>
The tiddler "task" contains the following code (I would rather prefer using <$reveal> instead of the combination <$set><$list><$tiddler> but filters doesn't seem to work with <$reveal>):
\define addThis() [[$(new)$]] $(old)$
<$set name="current" value=<<currentTiddler>> >
<$list filter="[[ToDo]!tag{!!title}]">
<$tiddler tiddler=<<current>> >
<$set name="old" value={{ToDo!!tags}}>
<$set name="new" value={{!!title}}>
<$button set="ToDo!!tags" setTo=<<addThis>> >{{!!title}}</$button>
</$set>
</$set>
</$tiddler>
</$list>
<$list filter="[[ToDo]tag{!!title}]">
<$tiddler tiddler=<<current>> >
<$list filter="[[done]!tag{!!title}]">
<$tiddler tiddler=<<current>> >
<$checkbox tiddler="done" tag={{!!title}}>{{!!title}}</$checkbox>
</$tiddler>
</$list>
</$tiddler>
</$list>
<$list filter="[[ToDo]tag{!!title}] +[[done]tag{!!title}]">
<$tiddler tiddler=<<current>> >
<$checkbox tiddler="done" tag={{!!title}}>~~{{!!title}}~~</$checkbox>
</$tiddler>
</$list>
</$set>
Hi everybody,
...
{{catch the moon||task}}
<$set name="containingTiddler" value=<<currentTiddler>> > {{catch the moon||task}} {{buy flowers||task}} </$set>
--
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
There is a standard variable "storyTiddler" that is set by the default viewtemplate to the title of the tiddler in the story; you should be able to use it to avoid your "containingTiddler" variable.
Also be aware that the {{transclusion}} syntax is actually a shorthand for a tiddler widget containing a transclude widget. You can use the transclude widget on it's own to transclude a tiddler without changing the current tiddler.
Now I face another problem (« And more difficult still! »)
There is a standard variable "storyTiddler" that is set by the default viewtemplate to the title of the tiddler in the story; you should be able to use it to avoid your "containingTiddler" variable.I think it is what I was looking for.
\define addThis() [[$(new)$]] $(old)$
\define tasks(ToDo:"ToDo",done:"done")
<$list filter="[[$ToDo$]!tag{!!title}]"> <$set name="old" value={{$ToDo$!!tags}}> <$set name="new" value="$(currentTiddler)$"> <$button set="$ToDo$!!tags" setTo=<<addThis>> >$(currentTiddler)$</$button> </$set> </$set> </$list>
<$list filter="[[$ToDo$]tag{!!title}]"> <$tiddler tiddler="$(currentTiddler)$" > <$list filter="[[$done$]!tag{!!title}]"> <$checkbox tiddler="$done$" tag="$(currentTiddler)$">$(currentTiddler)$</$checkbox> </$list> </$tiddler> </$list>
<$list filter="[[$ToDo$]tag{!!title}] +[[$done$]tag{!!title}]"> <$checkbox tiddler="$done$" tag="$(currentTiddler)$">~~$(currentTiddler)$~~</$checkbox> </$list>\end
<$macrocall $name="tasks" ToDo="$:/_tasks/ToDo/$(storyTiddler)$" done="$:/_tasks/done/$(storyTiddler)$"/>