Hi everybody,
The TaskManagementExample in tw.com [1] shows a list of task tiddlers with
checkboxes that can tag them as done. That means that, to create a list of
tasks, you previously need to create the corresponding tiddlers and tag
them as "task" and, then, put a <$list filter="something"> to see the tasks
list.
I needed a simpler way to create task lists without creating tiddlers. My
idea was to just start writing a list of things displayed as tasks. And the
solution I found is using a "ToDo" tiddler and a "done" tiddler, and tag
them with the task, instead of doing the other "normal" way around. And the
list is created through a transclusion template, like that:
{{This is a task that is not an existing tiddler||task}}
{{This is another one||task}}
{{And a third||task}}
The name of the tasks are not tiddler titles for there's no corresponding
tiddlers. The only required tiddlers are:
- task
- ToDo
- done
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}] +[[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>
When transcluded, the task appears as a button. On click, it tags the
tiddler "ToDo" with that task and displays the text of the task with a
checkbox. On check, the tiddler "done" is tagged with the task and the text
of the task is ~~(I don't remenber the word for that :-)~~
Hope this is helpful.
Alberto
[1] http://tiddlywiki.com/#:TaskManagementExample
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.