caption: transclusion created: 20141002004621385 modified: 20150107121000000 tags: Variables title: WidgetVariable: transclusion type: text/vnd.tiddlywiki The ''transclusion'' [[variable|Variables]] is automatically set by the TranscludeWidget to contain a string identifying the position of the current node within the widget tree. With the ''transclusion'' variable, the QualifyMacro identifies the stack of transcluded tiddlers. In the sidebar, the ''transclusion'' variable is set to:
`{|$:/core/ui/PageTemplate/sidebar|||}` When the tiddler "HelloThere" is displayed in the story river ''transclusion'' is set to:
`{HelloThere|HelloThere|||}` Each nested level of transclusion appends another curly bracketed list of symbols. !! Example ''identifying if we're in the sidebar or not'' ``` \define mymacro() We are <$list filter="[prefix[{|$:/core/ui/PageTemplate/sidebar|||}]]" emptyMessage="in the story river."> in the sidebar. \end <> ``` Result in a story tiddler: <<< We are in the story river. <<< Result in the sidebar: <<< We are in the sidebar. <<<