Problem with list-before and toc-tabbed-internal-nav

133 views
Skip to first unread message

Stephen Kimmel

unread,
Jun 29, 2016, 3:34:43 PM6/29/16
to TiddlyWiki
Perhaps one of the clever folks here can explain to me why this doesn't work the way I expected.

I'm working on a wiki of the Old Testament books arranged in the classical Jewish order. In case you are unfamiliar with that, the books should appear in this order:

Genesis, Exodus, Leviticus, Numbers, Deuteronomy, Joshua, Judges, 1 Samuel, 2 Samuel, 1 Kings, 2 Kings, Isaiah, Jeremiah, Ezekiel, Hosea, Joel, Amos, Obadiah, Jonah, Micah, Nahum, Habakkuk, Zephaniah, Haggai, Zechariah, Malachi, Psalms, Proverbs, Job, Song of Songs, Ruth, Lamentations, Ecclesiastes, Esther, Daniel, Ezra, Nehemiah, I Chronicles, II Chronicles


I would like to set it up to read the sections using the toc-tabbed-internal-nav function. As close as I can tell, that function doesn't support a sort parameter so I am setting up a list using the field "list-before" in each of the 39 tiddlers.So the tiddler titled Genesis has a field list-before that contains Exodus, the tiddler Exodus has a list-before field that contains Leviticus, etc down through the tiddler I Chronicles which has a list-before field which contains II Chronicles.


The current Tiddlywiki Prerelase 5.whatever gives this order for the tiddlers in toc-tabbed-internal-nav as:


II Chronicles,2 Samuel, 1 Kings, Judges, 1 Samuel, Song of Songs, Ruth, Lamentations, Ecclesiastes, Esther, Daniel, Jeremiah, Ezekiel, Nehemiah, I Chronicles, 2 Kings, Isaiah, Hosea, Numbers, Deuteronomy, Joshua, Genesis, Exodus, Obadiah, Jonah, Micah, Ezra, Leviticus, Joel, Amos, Zechariah, Malachi, Psalms, Proverbs, Job, Zephaniah, Haggai, Nahum, Habakkuk


There are stretches that are in the right order but the only tiddler that doesn't appear in another tiddler's list-before field is near the middle of the order while the only tiddler with an empty list-before field is the first one on the list. There are several jumps where the tiddlers are in the wrong order. My II Chronicles did have an empty list-before field but when I deleted that field, 2 Samuel which does have an appropriate list-before field, goes to the front of the list.


If I do a <$list filter="[tag[book]]"> I get the same order.


Something is going on that I don't understand and I'm hoping someone can explain it to me. Is this simply too long a group for Tiddlywiki 5 to handle using list-before or list-after (which didn't work either)?

Stephen Kimmel

unread,
Jun 29, 2016, 4:48:50 PM6/29/16
to TiddlyWiki
I figured it out. Even though the documentation doesn't explicitly say so, the toc macros do support a sort input. In my case I added a field called order which I populated with the correct numerical order for each book. Then I made my Contents tiddler say:

<$macrocall
 $name="toc-tabbed-internal-nav"
 tag="Book"
sort="nsort[order]"
 selectedTiddler="$:/temp/toc/selectedTiddler"
 unselectedText="
<p>Select a book in the table of contents. Click the arrow to expand a topic.</p>"
 missingText="
<p>Missing tiddler.</p>"
/>


And that did it.

Jeremy Ruston

unread,
Jul 1, 2016, 4:52:55 AM7/1/16
to tiddl...@googlegroups.com
Hi Stephen

I figured it out. Even though the documentation doesn't explicitly say so, the toc macros do support a sort input.

The sort parameter is actually documented here, but perhaps not prominently enough?


Best wishes

Jeremy


In my case I added a field called order which I populated with the correct numerical order for each book. Then I made my Contents tiddler say:

<$macrocall
 $name="toc-tabbed-internal-nav"
 tag="Book"
sort="nsort[order]"
 selectedTiddler="$:/temp/toc/selectedTiddler"
 unselectedText="
<p>Select a book in the table of contents. Click the arrow to expand a topic.</p>"
 missingText="
<p>Missing tiddler.</p>"
/>


And that did it.

--
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4d968052-6524-4cb7-b070-bbc60335f0ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages