How do I display the content of a subtiddler (shadow tiddler) as code/unrendered

I am building a preview for tiddlers that shows the actual content of the original shadow tiddler and just cant seem to find a way to do so;

For example in a new tiddler. 5.3.2+

<$transclude $tiddler={{{ [[$:/ControlPanel]shadowsource[]] }}} $subtiddler="$:/ControlPanel" $mode="block" $output="text/plain"/>

And what mistake am I making?

Do I need to somehow extract the tiddler from the plugin tiddlers JSON representation of the selected tiddler?

The info needed is described at:

eg:

\define subtiddler() $:/plugins/tiddlywiki/internals/readme
\define plugin-tiddler() $:/plugins/tiddlywiki/internals

<$set name=shadowContent tiddler=<<plugin-tiddler>> subtiddler=<<subtiddler>> field=text >

<pre><code>
<$text text=<<shadowContent>>/>
</code></pre>

Thanks Mario, if I had remembered that the set widget had the subfilter parameter I may have realised. I will look into improving the documentation and tying subtiddler more closely to shadows.

For anyone passing here in the future;

Because this method extracts a subtiddler from a plugin, which is effectively a tiddler containing other tiddlers, in a JSON format. It does so directly, rather than through the normal shadow mechanism and this means.

  • The plugin tiddler can exist but be disabled and you can still see the “shadow content”.

I mention it for completeness and as an alternative way to access content inside a “JSON bundle of tiddlers” as well.

1 Like