AutomatedLinkUpdate

100 views
Skip to first unread message

Alain Dutech

unread,
May 6, 2014, 4:05:45 AM5/6/14
to tiddl...@googlegroups.com
 
Hi,

I know that TW is "non-linear" but I'd like to automate some "linearity" :o)
So, more clearly :

I have some tiddlers telling a (linear) story and I order them according to a custom field (let's call it "_date"). I'd like to have, in any of these tiddlers, a link to the preceding one and to the next one, according to the order induced by _date. How could I do this ?

I can have an ordered list of all the tidler using filters and I thought I could extract from this list the "previous" tiddler
{{{ [tag[thestory]!is[system]] +[has[_date]] +[sort[_date]] }}}

Using the "previous" operator, I thought I could extract from this the preceding tiddler and use that in a <$link> <$view> LINK </$view></$link> block. But the previous operator needs the list to be in the "ListField" of a tiddler I think.

So 1) how can I set/update the ListField of a tiddler from another tiddler macro (if I add a new tiddler between two others, I need to update this list)
     2) is there a better way to do this, I mean "how would YOU automatically update such prev/next links" ?

Thanks a lot, for the good work on TW5, but also if you hav some feedback for me :o)
Alain

Jeremy Ruston

unread,
May 12, 2014, 11:03:40 AM5/12/14
to TiddlyWiki
Hi Alain

In 5.0.11 you'll be able to use the new before/after filter operators to do what you want. This example adapts your filter expression and then selects the tiddler after "HelloThere":

[tag[thestory]!is[system]has[_date]sort[_date]after[HelloThere]]

This example selects the tiddler before the current one:

[tag[thestory]!is[system]has[_date]sort[_date]before{!!title}]

Best wishes

Jeremy



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



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Xavier Cazin

unread,
May 12, 2014, 12:20:08 PM5/12/14
to tiddl...@googlegroups.com
Hi Jeremy,

Speaking of sequences, let's say I have a few titles in the list field of a ToC tiddler : [[Introduction]] [[My second chapter]] [[Here is the third one]].

I'd like to count the number of tiddlers before the current tiddler, in order to display for instance "Chapter 2 : My second chapter" from <$count filter="[all[current]operation-that-returns-the-sublist-upto-the-current-tiddler]"/>. Is there a way to achieve this from the set of operators available?

Best regards,
Xavier.

-- Xavier Cazin

Jeremy Ruston

unread,
May 12, 2014, 12:25:24 PM5/12/14
to TiddlyWiki
Hi Xavier

Speaking of sequences, let's say I have a few titles in the list field of a ToC tiddler : [[Introduction]] [[My second chapter]] [[Here is the third one]].

I'd like to count the number of tiddlers before the current tiddler, in order to display for instance "Chapter 2 : My second chapter" from <$count filter="[all[current]operation-that-returns-the-sublist-upto-the-current-tiddler]"/>. Is there a way to achieve this from the set of operators available?

I don't think that that can be done at the moment. We'd need something like "allbefore" and "allafter" which would return all the tiddlers preceding or succeeding the tiddler named in the operand.

Best wishes

Jeremy

Alain Dutech

unread,
May 27, 2014, 6:30:19 AM5/27/14
to tiddl...@googlegroups.com
Thanks Jeremy, with the new version, it works a I intended. That's nice.
Alain


--
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/cW35aB2QtMs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages