How to get into the title of a tiddler from variables?

40 views
Skip to first unread message

stevesuny

unread,
Mar 13, 2017, 5:14:43 PM3/13/17
to TiddlyWiki
I have:

\define showcomment($commenting-on$ $user$)
<hr>
1 - $user$<br>
2 - $commenting-on$<br>
<hr>
3 - <$view tiddler="$user$ on $commenting-on"/>
\end


For $user$ = steve and $commenting-on$ = "How do you do", then in another macro I've created the tiddler [[steve on How do you do]]

<$view tiddler="$user$ on $commenting-on$/> should work, in my view :) but doesn't.

Suggestions?

Thanks,

//steve.


s

Eric Shulman

unread,
Mar 13, 2017, 5:29:12 PM3/13/17
to TiddlyWiki
On Monday, March 13, 2017 at 2:14:43 PM UTC-7, stevesuny wrote:
I have:

\define showcomment($commenting-on$ $user$)
<hr>
1 - $user$<br>
2 - $commenting-on$<br>
<hr>
3 - <$view tiddler="$user$ on $commenting-on"/>
\end

Some syntax errors:
1) In the parameter list, do NOT use the $ delimiters... thus:
\define showcomment(commenting-on user)

2) In the <$view> widget, you are missing a closing "$"... thus:
3 - <$view tiddler="$user$ on $commenting-on$"/>

hope this helps,
-e
Eric Shulman
TiddlyTools: "Small Tools for Big Ideas" (tm)
InsideTiddlyWiki: The Missing Manuals

stevesuny

unread,
Mar 13, 2017, 6:00:15 PM3/13/17
to TiddlyWiki
Thanks, Eric.

That seems to work.
Much appreciated.

//steve.
Reply all
Reply to author
Forward
0 new messages