This is a quick way. Put the macros at the top of your tiddler:
\define toc-caption()
<$set name="tv-wikilinks" value="no">
<$transclude field="caption">
<$view field="title"/>{{||$:/core/ui/ViewTemplate/tags}}
</$transclude>
</$set>
\end
\define toc-body(tag,sort:"",itemClassFilter,exclude,path)
<ol class="tc-toc">
<$list filter="""[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]
-[[$tag$]] $exclude$""">
<$vars item=<<currentTiddler>> path="""$path$/$tag$"""
excluded="""$exclude$
-[[$tag$]]""">
<$set name="toc-item-class" filter="""$itemClassFilter$""" emptyValue=
"toc-item" value="toc-item-selected">
<li class=<<toc-item-class>>>
<$list filter="[all[current]toc-link[no]]" emptyMessage=
"<$link><<toc-caption>></$link>">
<<toc-caption>>
</$list>
<$macrocall $name="toc-body" tag=<<item>> sort="""$sort$"""
itemClassFilter="""$itemClassFilter$""" exclude=<<excluded>> path=<<path>>/>
</li>
</$set>
</$vars>
</$list>
</ol>
\end
This was just a quick hack of the existing TOC macros. It used to be (I
think) that you only had to override toc-caption. Now you have to override
the body a little.
Then invoke like <<toc HelloThere>>
As you see, it puts the tags on a separate line. So that may be less than
optimal. But it was fast ;-)
-- Mark
On Monday, July 16, 2018 at 11:39:01 PM UTC-7, Alex W wrote:
>
> Thank you, it is working like a charm :-)
>
> Is it possible to modify the way of display, eg. show the tags of the
> tiddlers?
>
> Greets, Alex
>
> Am Montag, 16. Juli 2018 22:33:56 UTC+2 schrieb TonyM:
>>
>> Alex,
>>
>> I will just add in your example, to use the TOC macros, you will need a
>> root tag, such as TableOfContents or in your case maybe "AllCategories"
>> that tags Category A and Category B then the TOCs root tag will be
>> AllCategories
>>
>> Regards
>> Tony
>>
>> On Tuesday, July 17, 2018 at 12:16:07 AM UTC+10, Alex W wrote:
>>>
>>> Thanks a lot, I will have a look into it!!
>>>
>>>
>>> Am Montag, 16. Juli 2018 15:56:54 UTC+2 schrieb Mark S.:
>>>>
>>>> The table-of-content macros can already do that for you:
>>>>
>>>> https://tiddlywiki.com/#Table-of-Contents%20Macros
>>>>
>>>> Have fun,
>>>>
>>>> -- Mark
>>>>
>>>> On Monday, July 16, 2018 at 5:40:57 AM UTC-7, Alex W wrote:
>>>>>
>>>>> Hello all,
>>>>>
>>>>> my question is probably a no-brainer for you folks, but I am totally
>>>>> overwhelmed
>>>>> :-(
>>>>>
>>>>> I have the following construct of tiddlers:
>>>>>
>>>>> - category-tiddler, not tagged
>>>>>
>>>>>
>>>>> - list-tiddler, tagged with a category
>>>>>
>>>>>
>>>>> - task-tiddler, tagged with a list
>>>>>
>>>>>
>>>>> I now want a nested (dynamic) view:
>>>>>
>>>>> Category A
>>>>> List X
>>>>> Task 1
>>>>> Task 2
>>>>> ....
>>>>> List Y
>>>>> Task 1
>>>>> Task 2
>>>>> ....
>>>>> Category B
>>>>> ...
>>>>>
>>>>> I tried various variations with filters and <$list..., but I did not
>>>>> got the clue.
>>>>> Could some pls help me out here? Tx a lot!!
>>>>>
>>>>> PS: I am using the TW-Plugin "Dropboard
>>>>> <https://reidgould.github.io/tiddlywiki-dropboard/>". Therefore the
>>>>> structure/ tagging etc. is given.
>>>>>
>>>>> Greets, Alex
>>>>>
>>>>
--
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 [email protected].
To post to this group, send email to [email protected].
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/1ac65d05-8137-48e9-98c2-7d56910a5898%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.