Üdv! :)
I have probably messed up the syntax somewhere because I have also tried
using the macrocall widget. Nevertheless it works now, so thanks! :)
For posterity's sake, here is my version of the above:
<$list filter="[all[current]tag[with-toc]]" variable="null">
<$set name="sectionTitle" value={{!!contents_title}}
emptyValue="Projects">
<h3><<sectionTitle>></h3>
</$set>
<div class="tc-table-of-contents">
<$macrocall $name="toc-selective-expandable" tag=<<currentTiddler>>/>
</div>
</$list>
I wanted to be able to override the title of the TOC section from the
individual tiddlers, if the default does not make sense there. I don't know
if this is best way to do it, but it works :D
On Tuesday, 28 January 2020 13:03:28 UTC+1, bimlas wrote:
>
> Üdv a klubban! :D
>
> Create a tiddler of any name and add a $:/tags/ViewTemplate tag with the
> following content:
>
> <$list filter="[all[current]tag[TableOfContents]]" variable="null">
>
> <h3>Contents</h3>
>
> <div class="tc-table-of-contents">
> <$macrocall $name="toc-selective-expandable" tag=<<currentTiddler>>/>
> </div>
>
> </$list>
>
> I don't know exactly what code you were trying to try, but these are the
> most likely errors:
>
>
> - The 'list' widget <https://tiddlywiki.com/#ListWidget> overwrites
> the 'currentTiddler' variable with the current element of the filter
> result, so you might want to specify 'variable = "null"' if you use it
> just
> to check the value of a condition.
> - If you tried the "<<toc-selective-expandable tag:<<currentTiddler>>
> >>" format, the problem was with the syntax: you cannot use a macro in a
> macro call, you have to use "macrocall" widget
> <https://tiddlywiki.com/#MacroCallWidget>.
>
>
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/c08ff4d9-5087-405a-a699-5e280533c378%40googlegroups.com.