How can the title be transcluded to a macro parameter as a wikilink.

89 views
Skip to first unread message

Jan

unread,
Jun 27, 2016, 11:25:56 AM6/27/16
to tiddlyWiki
Hello,
I want to create a template-button which automatically creates a new
tiddler as a child of a tiddler.
My attempt was this:

<$list filter="[all[current]tag[Film]]">
<$button>
<$action-sendmessage $message="tm-new-tiddler" title="Set a new title!"
source={{!!title}} />
Add a new child
</$button>
</$list>

In the result, in the field source there is just the text of the title.
I would need to have it in [[brackets]]. Can anyone tell me code/trick
to achieve this?

Thanks!
Jan

Mark S.

unread,
Jun 27, 2016, 8:41:31 PM6/27/16
to TiddlyWiki
Using the SetWidget with a macro, I think you can wrap the source title. This worked on mine, assuming that I understood what you wanted.

Good luck,
Mark

\define linksource() [[$(source)$]]

<$list filter="[all[current]tag[Film]]">
<$set name=source value={{!!title}}>

<$button>
<$action-sendmessage $message="tm-new-tiddler" title="Set a new title!"

source
=<<linksource>> />

Add a new child
</
$button>
</$set>
</
$list>

Jan

unread,
Jun 28, 2016, 7:07:26 AM6/28/16
to tiddl...@googlegroups.com
Hi Mark!
Thanks a lot!
I had solved my Issue worlarround-style just before I recieved your mail, but your explanation takes me to a new level...
That's how this works! With this knowledge I can attack the next problem!
Jan
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/6e996ba0-a3cf-40f4-9934-114703cebc0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages