...twiddler ... twiddlers
Thanks. Being new to this, I'm not sure what the best next step to take to implement David's ideas. For example, should I create a data twiddler that expresses the twiddlers that are in the desired path?
--
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/groups/opt_out.
The next and previous filters that David wrote are now in the core, and so are available to use.They work in association with the 'list' field, which is interpreted as a space-separated list of tiddler titles (using double square brackets to quote titles that contain a space). The next and previous filters both work in a similar way that's easiest to show with an example.
Let's say you have a tiddler called "Lesson1" with the "list" field set to:[[First Bit]] SecondBit FinalBitYou'll also need to create the named tiddlers.
Then, create a new tiddler called "Navigation" with the tag "$:/tags/ViewTemplate" and the following content:Next: <$list filter="[is[current]next[Lesson1]]"/> / Previous: <$list filter="[is[current]previous[Lesson1]]"/>
Now if you open a tiddler like "SecondBit" you should see at the bottom the controls to move to the next and previous tiddlers.The next and previous filter operators work by locating the currently selected tiddler(s) in the named list, and returning the adjacent next or previous tiddler from the list.
There are some error use cases I wonder about:Let's say you have a tiddler called "Lesson1" with the "list" field set to:[[First Bit]] SecondBit FinalBitYou'll also need to create the named tiddlers.What happens if a tiddler named in the list does not exist?
Then, create a new tiddler called "Navigation" with the tag "$:/tags/ViewTemplate" and the following content:Next: <$list filter="[is[current]next[Lesson1]]"/> / Previous: <$list filter="[is[current]previous[Lesson1]]"/>What does the filter produce if the "Lesson1" tiddler is missing or the list field is empty?
Now if you open a tiddler like "SecondBit" you should see at the bottom the controls to move to the next and previous tiddlers.The next and previous filter operators work by locating the currently selected tiddler(s) in the named list, and returning the adjacent next or previous tiddler from the list.What if the same tiddler title in the named list more than once... which occurence does the filter match as the "current selected tiddler"?
What does the [[Navigation]] template display if the current tiddler is not in the list at all?
When you reach the start/end of the list, does it loop around to the end/start, or just stop?
If navigation doesn't loop, when you reach the start/end, can display of non-functional links be suppressed?
Will there also be a [first[Lesson1]] and [last[Lesson1]] so a complete "FPNL" (First/Previous/Next/Last) navigation bar can be displayed?
enjoy,-e
Hi EricThere are some error use cases I wonder about:Let's say you have a tiddler called "Lesson1" with the "list" field set to:[[First Bit]] SecondBit FinalBitYou'll also need to create the named tiddlers.What happens if a tiddler named in the list does not exist?Nothing; the tiddlers named in the list don't need to exist.Then, create a new tiddler called "Navigation" with the tag "$:/tags/ViewTemplate" and the following content:Next: <$list filter="[is[current]next[Lesson1]]"/> / Previous: <$list filter="[is[current]previous[Lesson1]]"/>What does the filter produce if the "Lesson1" tiddler is missing or the list field is empty?If the list tiddler doesn't exist then the next and previous filter operators always return an empty list.Now if you open a tiddler like "SecondBit" you should see at the bottom the controls to move to the next and previous tiddlers.The next and previous filter operators work by locating the currently selected tiddler(s) in the named list, and returning the adjacent next or previous tiddler from the list.What if the same tiddler title in the named list more than once... which occurence does the filter match as the "current selected tiddler"?Currently it would return the entries adjacent to the first instance of the current tiddler.What does the [[Navigation]] template display if the current tiddler is not in the list at all?At the moment it still displays the Next: and Previous: text with no accompanying links.We need a way for the reveal widget to hide or show content depending on whether a filter evaluates to zero or more entries.
We need a way for the reveal widget to hide or show content depending on whether a filter evaluates to zero or more entries.
Is that something I can do through modifying the list filter, or would something need to be modified in the core?
Also, would it be possible using the current version (5.0.0-alpha.16-prerelease) for me to create Previous and Next buttons that, when clicked, navigate to the desired tiddlers? The Previous button would need to be disabled or not visible when on the first tiddler, and the Next button would need to be disabled when on the final tiddler.
mailto:jeremy...@gmail.comWhen you reach the start/end of the list, does it loop around to the end/start, or just stop?It stops at each end of the list.If navigation doesn't loop, when you reach the start/end, can display of non-functional links be suppressed?No links are displayed at the ends of the list.Will there also be a [first[Lesson1]] and [last[Lesson1]] so a complete "FPNL" (First/Previous/Next/Last) navigation bar can be displayed?Good idea, there should be. I've created a ticket:Best wishesenjoy,-e--
Jeremy Ruston
Hi JimWe need a way for the reveal widget to hide or show content depending on whether a filter evaluates to zero or more entries.
Is that something I can do through modifying the list filter, or would something need to be modified in the core?Adding that variant of the reveal widget is a modification that needs to be made to the core.Also, would it be possible using the current version (5.0.0-alpha.16-prerelease) for me to create Previous and Next buttons that, when clicked, navigate to the desired tiddlers? The Previous button would need to be disabled or not visible when on the first tiddler, and the Next button would need to be disabled when on the final tiddler.
Isn't that what the example above does? We use links rather than buttons because in TW5 buttons are for actions and links are for navigation.
I want the previous next function only to be visible in relevant tiddlers.Now it is added to the viewtemplate of all tiddlers.Is there a "hide- or showwhen" function which will hide/show the navigation panel from tiddlers based on tags - or sth. like that...?
Cheers Måns Mårtensson
Den torsdag den 28. november 2013 18.20.16 UTC+1 skrev Eric Shulman:On Thursday, November 28, 2013 8:02:18 AM UTC-8, Jeremy Ruston wrote:The next and previous filters that David wrote are now in the core, and so are available to use.They work in association with the 'list' field, which is interpreted as a space-separated list of tiddler titles (using double square brackets to quote titles that contain a space). The next and previous filters both work in a similar way that's easiest to show with an example.There are some error use cases I wonder about:Let's say you have a tiddler called "Lesson1" with the "list" field set to:[[First Bit]] SecondBit FinalBitYou'll also need to create the named tiddlers.What happens if a tiddler named in the list does not exist?Then, create a new tiddler called "Navigation" with the tag "$:/tags/ViewTemplate" and the following content:Next: <$list filter="[is[current]next[Lesson1]]"/> / Previous: <$list filter="[is[current]previous[Lesson1]]"/>What does the filter produce if the "Lesson1" tiddler is missing or the list field is empty?Now if you open a tiddler like "SecondBit" you should see at the bottom the controls to move to the next and previous tiddlers.The next and previous filter operators work by locating the currently selected tiddler(s) in the named list, and returning the adjacent next or previous tiddler from the list.What if the same tiddler title in the named list more than once... which occurence does the filter match as the "current selected tiddler"?What does the [[Navigation]] template display if the current tiddler is not in the list at all?When you reach the start/end of the list, does it loop around to the end/start, or just stop?If navigation doesn't loop, when you reach the start/end, can display of non-functional links be suppressed?Will there also be a [first[Lesson1]] and [last[Lesson1]] so a complete "FPNL" (First/Previous/Next/Last) navigation bar can be displayed?enjoy,-e
Will it be possible to define/use a custom viewtemplate at some stage? - like:$:/tags/LessonViewTemplate
Is it possible to use the list macro/widget-thingy to generate the "list" field value and sort by a second custom field value?
<$list filter="[tags[]prefix[Lesson]]">
! <$view field="title"/>
{{{ [tag{!!title}sort[number]] }}}
</$list>
<$list.... >
<$link to={{!!title}} >Next </$link>
</$list>
I think that can work.
<$list filter="[is[current]tag[Lesson1]]">
Next: <$list filter="[tag[Lesson1]sort[number]next[]]"/> / Previous: <$list filter="[tag[Lesson1]sort[number]previous[]]"/>
</$list>
<$list filter="[is[current]tag[Lesson2]]">
Next: <$list filter="[tag[Lesson2]sort[number]next[]]"/> / Previous: <$list filter="[tag[Lesson2]sort[number]previous[]]"/>
</$list>Code hier eingeben...
<$list filter="[is[current]tags[]prefix[Lesson]]" variable="lesson">
Next: <$list filter="[tag[<<lesson>>]sort[number]next[]]"/> / Previous: <$list filter="[tag[<<lesson>>]sort[number]previous[]]"/>
</$list>
:(
\define prevnext(lesson)
Previous: <$list filter="[tag[$lesson$]sort[number]previous[]]"/>
/ Next: <$list filter="[tag[$lesson$]sort[number]next[]]"/>
\end
<$list filter="[is[current]tags[]prefix[Lesson]]" variable="lesson"><hr><$macrocall $name="prevnext" lesson=<<lesson>>/></$list>