Hi all

Now I face another problem (« And more difficult still! »)


SOLVED! 
 

> 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. 
>

Indeed, it was what I was looking for. And I learned that I can just use 
inside macros variables like <<currentTiddler>> and <<storyTiddler>> 
without even declaring them thanks to the syntax $(storyTiddler)$. It opens 
to me a whole new world of opportunities!!!

AND THIS IS MY SOLUTION:

(The following is the content of the tiddler "task")

\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)$"
/>



You can see it in action here: 
https://www.dropbox.com/s/mvpxtzs2e01v90e/TW%20for%20Teachers%20-%205.0.13.html
The tasks created inside a journal tab of a course (see "CB-FR 1401") are 
taken as tasks of this course and displayed in the tasks tab.

Regards,

Alberto

-- 
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.

Reply via email to