Hello!

So I'm not sure if there was some confusion between PMario and I or what 
but I was able to figure it out! :D (Sorry, really giddy even though I'm 
still a little uncertain the details of the solution lol).

<$list filter=[has[sett-type]each[sett-type]]>
<div class="tc-menu-list-item">
''<$view field="sett-type"/>''
<$list filter="[contains:sett-type{!!sett-type}!is[system]sort[title]]">
<div class="tc-menu-list-subitem">
<$link to={{!!title}}><$view field="title"/></$link>
</div>
</$list>
</div>
</$list>

I have several Tiddlers each with a custom "sett-type" field with a 
subsequent value. I may have three Tiddlers listed as *Town* and two listed 
as *City*

IE: sett-type: Town or sett-type: City

The above code filters all Tiddlers with the sett-type field and then 
groups them by their sett-type field value.

IE: 

*City*
   City 1
   City 2

*Town*
   Town 1
   Town 2
   Town 3

The big deal, at least for me, is now I don't need placeholder Tiddler's 
for City or Town regarding the toc code. I can replace the toc code on the 
main "Settlements" page (the Settlments index basically) with the above 
filtered list and get the same dynamic effect without the need for 
placeholder tiddlers.

Happy mole! 

<(^.^<) <(^.^)> (>^.^)>

Resources: https://tiddlywiki.com/#GroupedLists, 
https://groups.google.com/g/tiddlywiki/c/GaBZEjEEUdg, 
https://tiddlywiki.com/#ListWidget

On Thursday, June 24, 2021 at 2:42:10 PM UTC-4 Darth Mole wrote:

> Thank you very much for clarifying PMario!
>
> On Thursday, June 24, 2021 at 3:50:26 AM UTC-4 PMario wrote:
>
>> If you want to group something you'll need real tiddlers. Otherwise you 
>> will get the problems you describe.. 
>>
>> You may be interested in the tocP macro which allows you to create tocs 
>> based on fields. The default is the parent field. But it can be any field 
>> name. .... BUT you still need tiddlers
>>
>> https://wikilabs.github.io/editions/tocP/
>>
>> -m
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f2cff9fb-3c79-4d4d-9edc-444aae0dd8aen%40googlegroups.com.

Reply via email to