On Sunday, September 6, 2020 at 8:17:02 AM UTC-7, talha131 wrote:

> I have a macro, which basically list all the tiddlers tagged with the 
> current tiddler in a vertical tab list 
> How do I automatically apply it to all the tiddler that are a tag?
> Say I create a new tag example. Then,
>
>    1. A tiddler named example should automatically get created
>    2. example tiddler should automatically show the tiddlers with the tag 
>    example in a vertical tab list
>    3. If I edit the example tiddler with some other content then the 
>    vertical tag should stop showing. Instead it should the content I manually 
>    entered.
>
> Try this:

1) Create a tiddler (e.g, "TagTabs"), tagged with $:/tags/ViewTemplate, 
containing: 
<$list filter="[tag<currentTiddler>limit[1]]" variable="is_a_tag">
<$list filter="[<currentTiddler>!has[text]]" variable="has_no_text">

<$macrocall $name="tabs" 
tabsList="[tag<currentTiddler>]"
default=<<__defaultTid__>>
state="$:/state/tab1" 
class="tc-vertical" 
template="$:/talha131/Template/VerticalTab"
retain="no"
/>

</$list>
</$list> 

Notes:
* Tagging this tiddler with $:/tags/ViewTemplate adds the content to every 
tiddler
* The first $list checks to see if the current tiddler is a tag
* The second $list checks to see if the current tiddler has a blank text 
field
* If both conditions are met, then the <$macrocall> is shown, otherwise 
nothing is shown

enjoy,
-e


-- 
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/7caa266a-70bf-4448-b7f8-67cc182aa1fbo%40googlegroups.com.

Reply via email to