Linking transcluded text (TW5)

87 views
Skip to first unread message

Miles Smith

unread,
Aug 3, 2016, 5:40:07 PM8/3/16
to tiddl...@googlegroups.com
I have a template: 

<<<
<$transclude mode="block"/>
<<< <$transclude field="quote_author" />, <$transclude field="quote_source" />, <$transclude field="quote_location" />.

Works perfectly:

This is a quote

Test Author, Test Source, Test Location


But I want the quote_author and quote_source to link to whatever they transclude to, but when I use the usual syntax it breaks the transclusion. (see below) Any workarounds?

Jeremy Ruston

unread,
Aug 6, 2016, 10:25:03 AM8/6/16
to TiddlyWiki
Hi Miles

On Wed, Aug 3, 2016 at 10:40 PM, Miles Smith <unill...@gmail.com> wrote:
I have a template: 

<<<
<$transclude mode="block"/>
<<< <$transclude field="quote_author" />, <$transclude field="quote_source" />, <$transclude field="quote_location" />.

Works perfectly:

This is a quote

Test Author, Test Source, Test Location


But I want the quote_author and quote_source to link to whatever they transclude to, but when I use the usual syntax it breaks the transclusion. (see below) Any workarounds?

Try this:

<<<
<$transclude mode="block"/>
<<< <$link to={{!!quote_author}}><$transclude field="quote_author" /></$link>, <$link to={{!! quote_source}}><$transclude field="quote_source" /></$link>, <$transclude field="quote_location" />.

Best wishes

Jeremy 

--
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+unsubscribe@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/f3dc5afd-18b7-4beb-9590-790873333778%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com
Reply all
Reply to author
Forward
0 new messages