For the passers by

 <$transclude field="caption">
    <$view field="title"/>
 </$transclude>

*Shows only the caption OR the title because*


The TranscludeWidget <https://tiddlywiki.com/#TranscludeWidget> treats any 
contained content as a fallback if the target of the transclusion is not 
defined 

(ie a missing tiddler or a missing field).


This varies according to the widget in use, look at tiddlywiki.com widget 
tiddler to see the ViewWidget works the same way but not others;

eg The *action-createtiddler* widget is invisible. Any content within it is 
ignored. The content of the <$browse> widget is ignored....


Regards

Tony


On Wednesday, December 11, 2019 at 2:54:46 PM UTC+11, A Gloom wrote:
>
> Thanks for all help & tips, managed to get it working :) 
>
>
> most excellant to hear
>  
>
>> I created a macro with 
>>
>> \define tv-wikilink-tooltip()
>> <$transclude field="caption"><$transclude field="title"/></$transclude>
>> \end
>>
>
> ah, thats how the ToC macro displays caption then title -- you can also 
> use that in normal lists (see below) -- reusing code is good 
>
> <$list filter="[list[$:/tags/SideBar]]">
>
> <$set name="tv-wikilinks" value="yes">
>   <$link><$transclude field="caption">
>     <$view field="title"/>
>   </$transclude></$link>
> </$set>
> </$list>
>
>
> ToC macro
>
> \define toc-caption()
> <$set name="tv-wikilinks" value="no">
>   <$transclude field="caption">
>     <$view field="title"/>
>   </$transclude>
> </$set>
> \end
>
>

-- 
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/2f4b3eb4-942d-49b7-84c2-a3b7ba5ec94d%40googlegroups.com.

Reply via email to