In order to concatenate, the macro needs either placeholders (e.g. $name$)
or variables (e.g. $(variable)$). In this case, $(currentTiddler)$ is
already available. So you should be able to use:
\define stateName(name) $:/state/$(currentTiddler)$/$name$
Good luck!
-- Mark
On Sunday, October 7, 2018 at 6:44:54 PM UTC-7, Andrés Pérez wrote:
>
> So I have a reveal in a template tiddler because I need it to be reusable
> and unique per tiddler that is using the template.
> Basically I want a reveal in a tiddler that when clicked shows some text.
> I then want to use that same reveal in multiple tiddlers by just
> transcluding the template tiddler but having the reveal only show up on the
> tiddler where it is clicked and not the others.
>
> So, I tried with a macro where it builds the state tiddler like this:
>
> \define stateName(name) "$:/state/{{!!title}}/$name$"
>
> That works fine when I just call the macro in a text field by itself. So
> in a tiddler named 'test', adding this <<stateName foo>> results in
> $:/state/test/foo
>
> If I try it as the attribute for a reveal (<$reveal type="nomatch"
> state=<<stateName foo>> text="show">) the state tiddler which is created is
> $:/state/{{
>
> Can I do what I want to do?
>
>
>
--
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/7bcb2690-2568-43a0-ba5f-13634598e5ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.