Hi Eucaly

* if possible a macro to generate different result, depending on render
> location ?
>

There are several variables that have different values within the sidebar
than within a tiddler in the story river. You can use the list widget with
these variables to write conditional wikitext. The variables that are
useful for this purpose are:

* `storyTiddler` is set to the name of the current tiddler within tiddlers
in the story river, and is not defined within the sidebar
*  `transclusion` variable is set automatically by the transclude widget to
contain a string that identifies the position of the current node within
the widget tree. In the sidebar it is set to
`{|$:/core/ui/PageTemplate/sidebar|||}` and within the tiddler "HelloThere"
in the story river it is set to `{HelloThere|HelloThere|||}`. Each nested
level of transclusion appends another curly bracketed list of symbols

* for example, <<mymacro>> in *tiddler body* and the same macro in
*sidebar* will
> generate different result ?
>

Here's an example:

\define mymacro()
Hello from mymacro
<$list
filter="[<transclusion>prefix[{|$:/core/ui/PageTemplate/sidebar|||}]]"
emptyMessage="in a tiddler">
in the sidebar
</$list>
\end

<<mymacro>>

Best wishes

Jeremy


>
> b.r.
> Eucaly
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywikidev+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywikidev@googlegroups.com.
> Visit this group at http://groups.google.com/group/tiddlywikidev.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to