Tranclusion and linked references

Is it possible to show a link at the end of transcluded tiddler back to the original?

Is it possible to selectively show transcluded tiddlers as “quotes”?

Thank you in advance!

The answer to both questions is yes.

Just revert to the transclude widget rather than the shortcut form for a little more control, try this in a new tiddler on Tiddlywiki.com

><$transclude tiddler=CheckboxWidget mode=block/>

There are many ways to do this,

  • A question is can you edit the transcluded tiddler? if so just add a link at the end
    • [[CheckboxWidget]]
  • If you want it to be hidden when viewing the tiddler directly make it conditional
    • <$list filter="[all[current]!match[CheckboxWidget]]"><$link/></$list>
  • If you do not want to edit your transcluded tiddler make a macro for this; this includes the quote as well. Here I use the blockquote tag.
\define transclude-link()
<$link/>

<blockquote class="tc-quote">
<$transclude tiddler=<<currentTiddler>> mode=block/>
</blockquote>
\end

<$tiddler tiddler="CheckboxWidget">
<<transclude-link>>
</$tiddler>

I am using the tiddler widget to set current tiddler or you could add a parameter to the macro.

  • Its a good idea to always write macros to handle the current tiddler, then you can use it inside the current tiddler or inside a list etc…

I actually have more tips and tricks on this subject but it depends on your circumstances.

  • Especially if you want a link to viewTemplate or “code tiddlers”
3 Likes