TW5 - Way to change formatting of a link to a tiddler based on a tag that tiddler has?

108 views
Skip to first unread message

Matthew Petty

unread,
Mar 31, 2014, 8:48:55 PM3/31/14
to tiddl...@googlegroups.com
I have lots of tiddlers tagged with "task" and "done". I use the cool checkbox feature to check off tasks as done.
If a tiddler doesn't exist, it is written in italics. Therefore, it's possible to format the link based on an attribute of that tiddler.
So, is it possible to format a link to an existing tiddler tagged with "done" with strikethrough (or other formatting)?

For example:
This tiddler does not exist
This tiddler does exist and is NOT tagged "done"
---This tiddler does exist and IS tagged "done"--- (struck through)

Can this be done?


Stephan Hradek

unread,
Apr 1, 2014, 2:21:41 AM4/1/14
to tiddl...@googlegroups.com
Almost possible.

Create a tiddler called (e.g.) "tasklink" with this content (as an example)

<$list filter="[is[current]tag[done]]">
<strike>
<$link><$view field="title"/></$link>
</strike>
</$list>
<$list filter="[is[current]tag[task]!tag[done]]">
<span style="background-color:pink">
<$link><$view field="title"/></$link>
</span>
</$list>

Then, instead of writing [[mytask]], write {{mytask||tasklink}}

Hope this helps.


Matthew Petty

unread,
Apr 3, 2014, 5:52:08 PM4/3/14
to tiddl...@googlegroups.com
That's very useful, thank you!


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/QAdf2MBUpJo/unsubscribe.
To unsubscribe from this group and all its topics, 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.

Danielo Rodríguez

unread,
Apr 4, 2014, 5:39:05 AM4/4/14
to tiddl...@googlegroups.com
How do you use task that doesn't exist as a tiddler?

Matthew Petty

unread,
Jun 9, 2014, 4:41:33 PM6/9/14
to tiddl...@googlegroups.com
That's great, thank you!
Reply all
Reply to author
Forward
0 new messages