Embedded lists not working

55 views
Skip to first unread message

Diego Mesa

unread,
Jan 17, 2019, 3:41:45 PM1/17/19
to TiddlyWiki
Hello all,

Inspired by a recent Pull Request, I am trying to use the list widget to replace my previous use of the reveal widget, but I came across a strange problem with a list inside a list. 

Steps:
  • Go to tiddlywiki.com
  • Replace the content of the HelloThere tiddler with the code below
  • Note you see the "Posts tagged with me", but the inner list does not "fire". 
  • If you remove the outer list, the inner list does "fire".

<$list filter="[tag{!!title}first[]]">

  !! Posts tagged with me

  <$list filter="[tag{!!title}]"/>

</$list>


Thanks,
Diego

TonyM

unread,
Jan 17, 2019, 4:51:36 PM1/17/19
to TiddlyWiki
Diego,

Here is my version that works. And some notes

<$list filter="[tag{!!title}limit[1]]" variable=null>

  !! One or more Posts tagged with me

  <$list filter="[tag{!!title}]"></$list>

</$list>

Notes:
  • first[] would work but limit[1] make more sense to me
  • The First list would only return one tiddler as the currentTiddler, the second list starts with this new "first" tiddler as the current tiddler
  • By placing variable=null on the outer list currentTiddler thus {!!title} remains the actual tiddler this is what is required in the inner list.
  • the inner-list needed to be closed with a </$list> and relies on returning the list of title because it is "empty"
<$list filter="[tag{!!title}limit[1]]">

!! One or more Posts tagged with me

</$list>


<$list filter="[tag{!!title}]"/>
The above is logically the same (no inner or outer list), but as you did it uses /> to close the list, I avoid that as it is easier to see the list widgets open and close are balanced much clearer if you use </$list>

Regards
Tony

Mark S.

unread,
Jan 17, 2019, 5:06:46 PM1/17/19
to TiddlyWiki
 Hi Diego,

Not sure what you were expecting to happen. The first filter looks at all the titles tagged with "HelloThere" and finds the first one.

The first one is "A gentle Guide To TiddlyWiki".

There is nothing tagged with the name "A gentle Guid to TiddlyWiki.", so the 2nd list doesn't fire.

Thanks!
-- Mark

Diego Mesa

unread,
Jan 17, 2019, 7:47:33 PM1/17/19
to TiddlyWiki
Sorry I wasn't clear - I only want to show a list with all posts tagged with the title of the current wiki, If there are indeed tiddlers that have that tag. Its a way of only showing "!! Posts tagged with me" if there are indeed posts to show, without using the reveal widget.

TonyM

unread,
Jan 17, 2019, 8:28:05 PM1/17/19
to TiddlyWiki
Diego,

Addressed in my Post.

Regards
Tony

Diego Mesa

unread,
Jan 17, 2019, 9:00:20 PM1/17/19
to TiddlyWiki
Hey Tony,

Thanks! I made a Rookie Mistake! I forgot that the value of {{!!title}} in the outer list is not the value of {{!!title}} in the inner list, unless I throw away/prevent changing the currentTiddler variable


🤦

Thanks!
Reply all
Reply to author
Forward
0 new messages