# 3. Plus a little of the others.

Change the emptyMessage attribute to 
emptyMessage="{{||$:/core/ui/TagTemplate}}"

But you may not like the bold text it now uses to display the related tags.

-- Mark

On Friday, August 10, 2018 at 7:34:19 AM UTC-7, George ZP wrote:
>
> Mark,
>
> Thank you for your reply.
> While the formatting works, the on-click tag behaviour (showing the tagged 
> Tiddlers) doesn't work.
>
> Is this intentional, accidental or a shortcoming of your approach?
>
> On Friday, August 10, 2018 at 5:28:15 PM UTC+3, Mark S. wrote:
>>
>>  Unfortunately, you'll need to hack the TOC macro code a bit. Assuming 
>> that you only want this behavior in one tiddler, it's not too hard. Put 
>> this at the top of your tiddler:
>>
>> \define toc-caption()
>> <$set name="tv-wikilinks" value="no">
>>   <$transclude field="caption">
>>     {{||$:/core/ui/TagTemplate}}
>>   </$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><$view 
>> field='caption'>{{||$:/core/ui/TagTemplate}}</$view></$link>">
>>             <<toc-caption>>
>>           </$list>
>>           <$macrocall $name="toc-body" tag=<<item>> sort="""$sort$""" 
>> itemClassFilter="""$itemClassFilter$""" exclude=<<excluded>> path=<<path>>/
>> >
>>         </li>
>>       </$set>
>>     </$vars>
>>   </$list>
>> </ol>
>> \end
>>
>> Now the output will show up as buttons. This code slightly modifies two 
>> of the supporting macros of the TOC macro system (toc-caption and 
>> toc-body).  You can look at the code and see where the tag pill template 
>> was applied.
>>
>> HTH
>> -- Mark
>>
>>
>>
>

-- 
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/07a17e59-77af-43cf-95e0-2dc899d57e98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to