Nested Lists, I think I am missing something.

36 views
Skip to first unread message

Ross Table

unread,
May 24, 2023, 11:23:51 AM5/24/23
to TiddlyWiki
I am able to list the Fields of a Tiddler when on it using this;

<$list filter="[all[current]fields[]sort[title]] -text" variable="listItem">
<<listItem>> = <$view field=<<listItem>>/><br>
</$list>

I am trying to wrap it inside another list such that it does not work with the current tiddler, but instead those in the first list. I know I need to change that filter, but cannot for the life of me work out how. I would definitely want to do it as a nested list because I need to group the fields.

My Simple List currently is just <$list filter="[tag[Chapter]]+[sort[]]"> otherListGoesHere </$list>

I even foolishly tried asking ChatGPT, but its grasp of TiddlyWiki is even worse than mine!

PMario

unread,
May 24, 2023, 1:39:29 PM5/24/23
to TiddlyWiki
For me this code worked well

```
\define showFields()

<$list filter="[all[current]fields[]sort[title]] -text" variable="listItem">
<<listItem>> = <$view field=<<listItem>>/><br>
</$list>
\end


<$list filter="[tag[Chapter]]+[sort[]]">
  <<showFields>>
  <hr>
</$list>
```

Instead of using a macro you could also copy your initial code into the outer list. test-gg-nested-list.png

Ross Table

unread,
May 25, 2023, 4:45:54 AM5/25/23
to TiddlyWiki
Thanks! That works!
Reply all
Reply to author
Forward
0 new messages