Re: [tw] Re: Macro working well, but not when Tiddler viewed in Sidebar - Problem with CurrentTiddler Variable

2016-09-08 Thread 'Mark S.' via TiddlyWiki
Table Of Contents

See: "http://tiddlywiki.com/#Adding a Table of Contents to the Sidebar" Link 



On Thursday, September 8, 2016 at 3:05:58 AM UTC-7, Eneko Gotzon wrote:
>
> ​Please, excuse these kind of questions.
>
> On Thu, Sep 8, 2016 at 12:31 AM, 'Mark S.' via TiddlyWiki <
> tiddl...@googlegroups.com > wrote:
>
>> If you want the TOC
>
>
> ​Please, what is TOC​?
>
> ​Thank you.
>
> -- 
> Eneko Gotzon Ares
> eneko...@gmail.com 
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/b498a049-bf3c-4de7-8039-82c7b51a7d61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: Macro working well, but not when Tiddler viewed in Sidebar - Problem with CurrentTiddler Variable

2016-09-08 Thread Eneko Gotzon
​Please, excuse these kind of questions.

On Thu, Sep 8, 2016 at 12:31 AM, 'Mark S.' via TiddlyWiki <
tiddlywiki@googlegroups.com> wrote:

> If you want the TOC


​Please, what is TOC​?

​Thank you.

-- 
Eneko Gotzon Ares
enekogot...@gmail.com

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/CAEV4i4Wi_d9Jv4GfKUJnFdO95DT0xFGrChizMKS6fwYLgNCRjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Macro working well, but not when Tiddler viewed in Sidebar - Problem with CurrentTiddler Variable

2016-09-07 Thread Tobias Beer
Hi Mark,
 

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

For example, by having some mechanism like TiddlyMap that detects what is 
scrolled into view.

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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/ae115ba3-7b80-4f17-ba8f-2d474494f66c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Macro working well, but not when Tiddler viewed in Sidebar - Problem with CurrentTiddler Variable

2016-09-07 Thread 'Mark S.' via TiddlyWiki
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 
> <> 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
>
> <>
>
> to
>
> \define toctoc(tiddler:<>) 
> """
> 
> <$macrocall $name="toc-selective-expandable" tag=$tiddler$/>
> 
> """
> \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 <> 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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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.


[tw] Re: Macro working well, but not when Tiddler viewed in Sidebar - Problem with CurrentTiddler Variable

2016-09-07 Thread NT
Ok Tobias, I think you want to point out that the context / scope of the 
<> 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

<>

to

\define toctoc(tiddler:<>) 
"""

<$macrocall $name="toc-selective-expandable" tag=$tiddler$/>

"""
\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 <> 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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/456fe069-820d-4a6a-88cb-e785c2886e31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Macro working well, but not when Tiddler viewed in Sidebar - Problem with CurrentTiddler Variable

2016-09-07 Thread Tobias Beer
Hi NT,

What would you think the <> 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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/3a70517a-fc94-4e5f-8177-ad19ba2f17b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.