Hi Eric,
Thank you very much!
It works like a charm.
--Mohammad
On Sunday, January 26, 2020 at 12:29:14 AM UTC+3:30, Eric Shulman wrote:
>
> On Saturday, January 25, 2020 at 11:47:53 AM UTC-8, Mohammad wrote:
>>
>> By default TiddlyBook uses "sequential reader" interface that lets one
>> steps through all the TOC items or all tiddlers.
>> How one can have this interface on those tiddlers only existed in TOC not
>> all tiddlers?
>>
>
> By default, if you are viewing a tiddler that is not in the <<toc-list>>,
> TiddlyBook/NavBar/Bottom shows links to the first <<toc-list>> item. I
> find this convenient when working on TiddlyBook internals, as it gives me
> an easy way to get back to the CoverPage for quick testing of changes.
> However, I can understand why it might also be desirable to suppress that
> default handling when TiddlyBook/NavBar/Bottom is used in other documents.
>
> To enable suppression of the default handling, I've changed the code to
> use $list instead of $tiddler when showing the the link/button output:
> <$list filter="[<currentTiddler>!tag[bookcover]!is[system]]">
> <div class="hideForPrint">
> @@.floatleft {{TiddlyBook/Popups/Chapters}} @@
> @@.floatright {{TiddlyBook/Popups/Appendix}} @@
> <div style="text-align:center;white-space:nowrap">
> <$wikify name="all" text="""<$macrocall $name="toc-list"
> here={{TiddlyBook/RootTag}} />""">
> <$vars first={{{ [enlist<all>first[]] }}}>
> <$vars prev={{{ [enlist<all>before<currentTiddler>] ~[<first>]
> }}}>
> <$vars next={{{ [enlist<all>after<currentTiddler>] ~[<first>]
> }}}>
> <$list filter=<<prev>>>
> <span class="tt-navbar-button">
> <$link tooltip=<<toc-caption>
> >>{{$:/core/images/chevron-left}}</$link>
> </span>
> </$list>
> <$list filter=<<next>>>
> <div style="display:inline-block;">
> @@.smaller ''//next topic://''<br>@@
> @@.largest <$link>''<<toc-caption>>''</$link>@@
> </div>
> <span class="tt-navbar-button">
> <$link tooltip=<<toc-caption>
> >>{{$:/core/images/chevron-right}}</$link>
> </span>
> </$list>
> </$vars>
> </$vars>
> </$vars>
> </$wikify>
> </div>
> @@.clear @@
> </div>
> </$list>
>
> This, in itself, does NOT change the default behavior... but, it does
> allow you quickly tweak ONE LINE in the code to achieve the result you
> want. Simply change this:
> <$vars first={{{ [enlist<all>first[]] }}}>
> to this:
> <$vars NO_first={{{ [enlist<all>first[]] }}}>
> The effect is that there is no longer a fallback default when calculating
> the "prev" and "next" values... and, since the code now uses $list instead
> of $tiddler, no output is produced when the current tiddler is not in the
> <<toc-list>>
>
> Q.E.D.
>
> I've posted the update to
> http://tiddlytools.com/InsideTW/#TiddlyTools%2FNavBar%2FBottom
>
> Give it a try and let me know how it goes.
>
> -e
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/959ae7a9-1b8d-4eb9-9510-f4c0d5d5155c%40googlegroups.com.