Hi Jeremy
Any objections to this version?
\define tabs(tabsList,default,state:"$:/state/tab",class,template)
<div class="tc-tab-set $class$">
<div class="tc-tab-buttons $class$">
<$list filter="$tabsList$" variable="currentTab">
<$tiddler tiddler=<<currentTab>> >
<$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$"
selectedClass="tc-tab-selected" tooltip={{!!tooltip}}>
<$set name="tv-wikilinks" value="no">
<$transclude tiddler=<<currentTab>> field="caption">
<$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/>
</$transclude>
</$set>
</$button>
</$tiddler>
</$list>
</div><div class="tc-tab-divider $class$"/><div class="tc-tab-content
$class$">
<$list filter="$tabsList$" variable="currentTab">
<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>>
default="$default$">
<$transclude tiddler="$template$" mode="block">
<$transclude tiddler=<<currentTab>> mode="block"/>
</$transclude>
</$reveal>
</$list>
</div>
</div>
\end
I've reset the currentTiddler only around the $button widget.
regards
On Wednesday, 23 December 2015 19:37:59 UTC+2, Jeremy Ruston wrote:
>
> Hi Matabele
>
> On 23 Dec 2015, at 17:33, Matabele <[email protected] <javascript:>>
> wrote:
>
> Struggling to reference the 'tooltip' field of each tab in the macro
>
>
> It’s dirty, but you may need to explicitly preserve and restore the
> current tiddler so that you’re able to use it to transclude the tooltip
> value.
>
> Best wishes
>
> Jeremy
>
--
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/6b1ff58d-8cb7-4e1a-8f63-c7f9039a1c57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.