Hi there,
i want to transclude the title of the current tiddler within a macro.
Firstly, here ist he macro:
\define myMacro()
---
look here for more informations: [[ {{!title}} (Info) ]]
---
\end
Secondly, here ist the macro call:
<<<myMacro>>>
Thirdly, this should be seen:
A link to a tiddler with a title which consists of a) the current tiddler and b) the string „ (Info“)
Background: I’m developing a set of flash cards and on the top of each page there should be a link to an „info-page“ for the current tiddler.
Thanks in advance
Jonathan
\define myMacro()
---
<$set name=ttl value={{!!title}}>
<<myMacro2>>
</$set>
---
\end
\define myMacro2()
look here for more informations: [[ $(ttl)$ (Info) ]]
\end
<<myMacro>>
Thanks, your solution is working – great!
One more question:
How would I do it the other way round:
Linking from „myTiddler (info)“ to „myTiddler“ ?
I would have to shorten the title oft the current tiddler, i.e. cut off the last 6 or 7 characters.
How would I do this?
\define mac2(ttl)
<$list filter=" [[$ttl$]] +[removesuffix[ (Info)]]" />
\end
\define mac1()
---
The following contains details relating to <$macrocall $name=mac2 ttl={{!!title}}/>
---
\end
<<mac1>>
\define myTitle(title) $title$ info""
<<myTitle {{!!title}}>>
Hi Matabele,
indeed, your approach does work for pure listing, but if you want to link to this very tiddler, it does not work …
\define myTitle(title) [[$title$ info]]
<<myTitle {{!!title}}>>
leaves you with a link to „{{!!title}} info“.
Thank you, Mark!
You are the guru here…