Get the text of a tiddler from a field containig the title

34 views
Skip to first unread message

kebi

unread,
Aug 17, 2020, 8:58:45 PM8/17/20
to TiddlyWiki
Hello guys,

I'm using a plugin that creates a field named "parent" that contains the title of another tiddler.
If I use <$view name={{!!parent}} /> I get the text of the tiddler contained in "parent".

The problem is that I need to use the result of <$view name={{!!parent}} /> inside a macrocall, how can I do it??

the macrocall looks like this:

<$macrocall $name="remembercz" id=<<currentTiddler>>

text=""

reference="TEXT OF PARENT HERE"/>

Eric Shulman

unread,
Aug 17, 2020, 9:10:14 PM8/17/20
to TiddlyWiki
First... the parameter for the <$view> widget is "tiddler" not "name".... thus:
<$view tiddler={{!!parent}}/>
I assume that was just a mistake when you posted your message, and not in your code.

Now... for the question you asked...

To get the text from a tiddler whose title is specified by the "parent" field in the current tiddler, you can use an "inline filter", like this:
{{{ [{!!parent}get[text]] }}}

So your macro call would look like this:
<$macrocall $name="remembercz" id=<<currentTiddler>> text="" reference={{{ [{!!parent}get[text]] }}}/>

enjoy,
-e

kebi

unread,
Aug 17, 2020, 9:29:02 PM8/17/20
to TiddlyWiki
Sorry for the mistake in the post.
Thanks so much Eric your example worked perfectly!
Reply all
Reply to author
Forward
0 new messages