Hi all,

Total TW/TW5 newbie here, slowly learning and tweaking. I've read quite a 
few posts in this group, and from what I can tell you all are a very 
helpful and newbie-friendly bunch, so I'm hoping someone may have some 
pointers for me. :)

I'd like to create a macro similar to the slider-macro, where a reader can 
click a button/link and have additional text (pulled from another tiddler 
via transclude) revealed. The catch is, I'd like to define where in the 
containing tiddler that text should appear. For example:

(title) Containing tiddler

This is a paragraph in the containing tiddler that contains the _link_ to 
reveal the child tiddler. This is some more text to fill up the paragraph.

> This is where I want the child tiddler to appear.

This is a second paragraph in the containing tiddler.


I currently have it working without custom macros as follows:

This is a paragraph in the containing tiddler that contains the
<$reveal type="nomatch" state="$:/revealstate" text="show">
<$button set="$:/SampleRevealState2" setTo="show" class="btn-invisible 
btn-link">link</$button>
</$reveal><$reveal type="match" state="$:/revealstate" text="show">
<$button set="$:/SampleRevealState2" setTo="hide" class="btn-invisible 
btn-link">link</$button></$reveal> to reveal the child tiddler. This is 
some more text to fill up the paragraph.

<$reveal type="nomatch" state="$:/revealstate" text="show">
</$reveal>
<$reveal type="match" state="$:/revealstate" text="show">
{{child tiddler}}
</$reveal>

This is a second paragraph in the containing tiddler.

Ideally, there'd be a way to write a macro to accomplish the same, perhaps 
with syntax similar to the following:
This is a paragraph in the containing tiddler that contains the <<revealmacro 
"link">> to reveal the child tiddler. This is some more text to fill up the 
paragraph.

<<revealmacro "{{child tiddler}}">>

This is a second paragraph in the containing tiddler.


Unfortunately, I'm computer-literate enough to cut, paste, and sometimes 
tweak... but I'm fairly clueless as to how writing a new macro would work.

Any ideas?  Thanks so much in advance!

-jess

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to