[TW5] Numbering Items With List Filter

498 views
Skip to first unread message

michaelha...@gmail.com

unread,
Jan 18, 2017, 9:43:59 PM1/18/17
to TiddlyWiki
I will apologize in advance if what I am asking for is either incredibly simple or outright impossible, but is there anyway to number Tiddlers when creating a list using the list filter option?

I am aware lists of Tiddlers can be created with something like this:

<$list filter="[!has[draft.of]tag[whatever]!sort[however]]">
<$link to={{!!title}}><$view field="title"/></$link>
</$list>

And that simple numbered lists can be created with something like this:

# Item 1
# Item 2
# Item 3

But is there anyway to get both of these elements together to create a numbered list of Tiddlers?

If anyone has any suggestions, they would be greatly appreciated.

Thank you.

Matthew Lauber

unread,
Jan 18, 2017, 9:49:01 PM1/18/17
to TiddlyWiki
<$list filter="[!has[draft.of]tag[whatever]!sort[however]]">

#<$link to={{!!title}}><$view field="title"/></$link>
</$list>

The empty line beneath the <$list> widget is important.

michaelha...@gmail.com

unread,
Jan 18, 2017, 10:17:43 PM1/18/17
to TiddlyWiki
Yes, that is true, and shame on me for leaving it out. However, I have already tried something like:

<$list filter="[!has[draft.of]tag[whatever]!sort[however]]">

#<$link to={{!!title}}><$view field="title"/></$link>
</$list>

and I am afraid the result is:

1. Tiddler title A

1. Tiddler title B

1. Tiddler title C

1. Tiddler title D

1. Tiddler title E

Is there anyway I might be able to create a properly numbered list?

Mr. Mal

unread,
Jan 18, 2017, 10:42:12 PM1/18/17
to TiddlyWiki
<ol>

<$list filter="[!has[draft.of]tag[whatever]!sort[however]]">

<li><$view field="title"/></li>
</$list>
</ol>

Try this

michaelha...@gmail.com

unread,
Jan 18, 2017, 10:51:39 PM1/18/17
to TiddlyWiki
Mr. Mal, thank you for the suggestion, but as far as I can tell that has only indented the list. Perhaps I have worded myself poorly, but I am hoping there is someway I can number a list of Tiddlers.

Penguinlay

unread,
Jan 19, 2017, 12:46:49 AM1/19/17
to TiddlyWiki
It worked fine for me. 

Here is a screenshot of mine.

Penguinlay

unread,
Jan 19, 2017, 12:50:47 AM1/19/17
to tiddl...@googlegroups.com
If you combine Matthew's suggestion with Mr. Mal's, you get the numbered list of links.

<ol>

<$list filter="[system[]]">
<li><$link to={{!!title}}><$view field="title"/></$link></li>
</$list>
</ol>


Thomas Elmiger

unread,
Jan 19, 2017, 1:11:02 AM1/19/17
to TiddlyWiki
Hi

Mr. Mal’s solution should work, here is some similar code that works for me:

<ol>
<$list filter="""[list[$:/StoryList]]""">
<li>
<$link to={{!!title}}><$view field="title"/></$link>
</li>
</$list>
</ol>

If this does not work in your wiki, then maybe you have something in the code above or below that has an undesired effect?

Good luck!
Thomas

michaelha...@gmail.com

unread,
Jan 19, 2017, 1:15:49 AM1/19/17
to TiddlyWiki
Mr. Mal, thank you for the original suggestion.

Penguinlay and Thomas, thank you both for the clarification.

I was missing the <li> tags. Adding those has gotten it working.

Again, thanks!

Tobias Beer

unread,
Jan 19, 2017, 7:25:59 AM1/19/17
to tiddl...@googlegroups.com
Hi Michaela,

Just use the below w/o extra newlines, since you do not want additional paragraphs that would otherwise be created owed to the parsing in block mode.

<ol>
<$list filter="[!has[draft.of]tag[whatever]!sort[however]]">
<li><$view field="title"/></li>
</$list>
</ol>

Best wishes,

Tobias.

Matthew Lauber

unread,
Jan 19, 2017, 10:25:27 AM1/19/17
to TiddlyWiki
Glad it got sorted out for you!
Reply all
Reply to author
Forward
0 new messages