Hi
Looks like the code does something like this:
\define toggle(button, altbutton)
<$reveal type="match" state="$:/temp!!$button$" text="show">
<$button set="$:/temp!!$button$" setTo="hide" class="tc-btn-invisible">
<$transclude tiddler="$button$"/>
</$button>
</$reveal>
<$reveal type="match" state="$:/temp!!$button$" text="hide">
<$button set="$:/temp!!$button$" setTo="show" class="tc-btn-invisible">
<$transclude tiddler="$altbutton$" />
</$button>
</$reveal>
\end
<<toggle "Content" "OtherContent">>
To get this to work -- bootstrap the '$:/temp' tiddler with a field
'Content' with a value of "hide"
Create the two content tiddlers with some text
regards
On Wednesday, 21 October 2015 07:20:17 UTC+2, Andrew wrote:
>
> That didn't completely work, I had to revert to the following and I still
> don't know what I'm doing:
>
> \define d()
> $:/temp/$(currentTiddler)$!!$(a)$
> \end
>
> \define toggle-body(a,b,c)
> <$vars a="""$a$""" b="""$b$""" c="""$c$""">
> <$reveal type="match" state=<<d>> text="">
> <$button set=<<d>> setTo=<<b>> class="tc-btn-invisible">
> <$transclude tiddler=<<a>> />
> </$button>
> </$reveal>
> <$reveal type="nomatch" state=<<d>> text="">
> <$button set=<<d>> setTo={{$c$!!target}} class="tc-btn-invisible">
> <$transclude tiddler=<<c>> />
> </$button>
> </$reveal>
> </$vars>
> \end
>
> \define toggle(a)
> <$macrocall $name="toggle-body" a=$a$ b={{$a$!!target}}
> c={{$:/temp/$(currentTiddler)$!!$a$}}/>
> \end
>
> Any more suggestions?
>
--
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 http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/8f248e4e-8fee-4e05-adcc-0cd1417bab94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.