If you have 10 tiddlers open, how would something in the sidebar know which 
one is "the" tiddler you want?

If you want the TOC in every tiddler, you can add it as part of the view 
template.

If you want the TOC in certain tiddlers (tagged a certain way, perhaps) you 
can add it wrapped in a context <$list> so it only appears when wanted.

If you actually want the TOC in the sidebar, then maybe (not sure on this 
point) you could have a button in your tiddlers that you click and which 
sets a configuration tiddler which the macro could use to know which one 
you want to currently use.

-- Mark

On Wednesday, September 7, 2016 at 2:25:41 PM UTC-7, NT wrote:
>
> Ok Tobias, I think you want to point out that the context / scope of the 
> <<currentTiddler>> Variable changes, if you show the tiddler in the sidebar.
> This was not my assumption. I assumed that the context of the Variable is 
> the tiddler and the tiddler is only presented in another "view" - I mean 
> the tiddler just got a tag ($:/tags/SideBar), nothing more.
> But as I understand you right the variable changes the scope from the 
> tiddler to the sidebar - which is unexpected to me.
>
> So - QUESTION - there is really no other way than
>
> 1. Call the macro with an explicit tiddler title as paramter like
>
> <<toctoc "Chapter 12">>
>
> to
>
> \define toctoc(tiddler:<<currentTiddler>>) 
> """
> <div class="tc-table-of-contents">
> <$macrocall $name="toc-selective-expandable" tag=$tiddler$/>
> </div>
> """
> \end
>
> OR
>
> 2. Do it the way I have done it before without explicit tiddler naming, 
> but don't put the macro-calling-tiddler itself to the sidebar but another 
> tiddler with a transclusion of the macro-calling-tiddler inside. Then it 
> works, I have tried. 
>
> ??? QUESTION END.
>
> For me both alternatives are not really "beautiful" - but ok, they work.
> Clarification would be nice, especially about the scope, also the behavior 
> in other contexts. I did not find really detailed information about that 
> here
>
> http://tiddlywiki.com/#currentTiddler%20Variable:%5B%5BcurrentTiddler%20Variable%5D%5D%20%5B%5BMacro%20Definitions%20in%20WikiText%5D%5D%20%5B%5BMacro%20Definition%20Syntax%5D%5D%20Variables%20%5B%5BVariables%20in%20WikiText%5D%5D%20%5B%5BMacro%20Calls%20in%20WikiText%5D%5D
> which were matching my usecase.
>
> Tobias, thanks for pushing me into the right direction!
>
>
>
> Am Mittwoch, 7. September 2016 20:27:35 UTC+2 schrieb Tobias Beer:
>>
>> Hi NT,
>>
>> What would you think the <<currentTiddler>> to be in the sidebar?
>> Of course, you'll have to use a macro parameter.
>>
>> Best wishes,
>>
>> Tobias. 
>>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/acd39dc3-b617-4468-b009-8d35b929d0c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to