[tw5] Re: TOC question

2019-02-08 Thread S. S.
Edited my previous post to correct the mistaken paste. Corrected the template tiddler code to: <$text text=<>/> <$transclude mode="block">$missingText$ -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop recei

Re: [tw5] Re: TOC question

2019-02-07 Thread Mohammad
Thank you John and Tony for clarification. --Mohammad On Friday, February 8, 2019 at 4:26:00 AM UTC+3:30, TonyM wrote: > > Folks, > > I will add to Jeremys post that the value of foo is changed as you expect, > when displayed as I have below. In a way you are reusing the variable name, > giving

[tw5] Re: TOC question

2019-02-07 Thread Dave Gifford - http://www.giffmex.org/
If anyone wants to see what I have been up to, here is a sample http://articulos.giffmex.org/1LDP/filemon.set.html On Thursday, February 7, 2019 at 8:21:57 PM UTC-6, Dave Gifford - http://www.giffmex.org/ wrote: > > oops actually it was the text Jeremy suggested in the beginning... > > On Thursd

[tw5] Re: TOC question

2019-02-07 Thread Dave Gifford - http://www.giffmex.org/
oops actually it was the text Jeremy suggested in the beginning... On Thursday, February 7, 2019 at 8:17:01 PM UTC-6, Dave Gifford - http://www.giffmex.org/ wrote: > > I should add that you meant to put <$view field="title"/> not > <> > > > On Thursday, February 7, 2019 at 8:02:58 PM UTC-6, Dave

[tw5] Re: TOC question

2019-02-07 Thread Dave Gifford - http://www.giffmex.org/
I should add that you meant to put <$view field="title"/> not < > On Thursday, February 7, 2019 at 8:02:58 PM UTC-6, Dave Gifford - http://www.giffmex.org/ wrote: > > Hi S.S. > > I have made the changes. And it works great! Thanks for both solutions. > > On Thursday, February 7, 2019 at 7:07:57

[tw5] Re: TOC question

2019-02-07 Thread Dave Gifford - http://www.giffmex.org/
Hi S.S. I have made the changes. And it works great! Thanks for both solutions. On Thursday, February 7, 2019 at 7:07:57 PM UTC-6, S. S. wrote: > > > David, > > It was not obvious to me what Tony & Jeremy meant by "using a template > parameter" as I was not aware of how it is used! > > If you lo

[tw5] Re: TOC question

2019-02-07 Thread S. S.
David, It was not obvious to me what Tony & Jeremy meant by "using a template parameter" as I was not aware of how it is used! If you look on the last line on the documentation for Table-of-Contents Macros , it says: *template* Optio

Re: [tw5] Re: TOC question

2019-02-07 Thread TonyM
Folks, I will add to Jeremys post that the value of foo is changed as you expect, when displayed as I have below. In a way you are reusing the variable name, giving it a new value. <$set name="foo" value="John"> <> <$set name="foo" value="Paul"> <> <$set name="foo" value="George"> <> <$set n

Re: [tw5] Re: TOC question

2019-02-07 Thread John
Yes. It's called dynamic scoping. Very unusual in languages. It's because JavaScript is a protype oriented language rather than class oriented. -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emai

Re: [tw5] Re: TOC question

2019-02-07 Thread Jeremy Ruston
Hi Dave > Thank you to everyone who posted. S.S.'s solution was exactly what I needed. > Thanks Jeremy for the explanation, too! The disadvantage of SS’s solution is that it requires you to override a core tiddler. The correct way to do it is to use a custom template parameter for the TOC macr

[tw5] Re: TOC question

2019-02-07 Thread Dave Gifford - http://www.giffmex.org/
Thank you to everyone who posted. S.S.'s solution was exactly what I needed. Thanks Jeremy for the explanation, too! Dave On Wednesday, February 6, 2019 at 5:43:02 PM UTC-6, David Gifford wrote: > > Hi all > > How would I tweak $:/core/macros/toc (or something else) so that each tab > in the to

Re: [tw5] Re: TOC question

2019-02-07 Thread Mohammad
WOW, This is amazing Jeremy! As mush as I go deeper in Tiddlywiki, I found more amazing thing. This gives us a lot of flexibility. I gonna to make some examples in TW-Scripts for this. By now I understood * I can have macro overloading in TW * I can send a macro name like a pointer from scope

Re: [tw5] Re: TOC question

2019-02-07 Thread Jeremy Ruston
> You said, the toc-caption here will override the one in the core! Can I > conclude that: > > If a macro is called in a scope of a tiddler and it calls a macro internally > say maymac, then if the maymac is existed in the scope of calling tiddler, > it will override the core or other scope ma

Re: [tw5] Re: TOC question

2019-02-07 Thread Mohammad
Hi Jeremy, This question may be off topic here. You said, the *toc-caption* here will override the one in the core! Can I conclude that: If a macro is called in a scope of a tiddler and it calls a macro > internally say maymac, then if the maymac is existed in the scope of > calling tiddler,

Re: [tw5] Re: TOC question

2019-02-07 Thread Jeremy Ruston
I’m not sure if it will let you do exactly what you want in this situation, but the reason that the toc-caption macro is separated out is so that it can be redefined for a particular instantiation of the TOC. For example, here we have a tabbed internal navigation TOC where the toc-caption macro

[tw5] Re: TOC question

2019-02-06 Thread S. S.
David, Open the shadow tiddler: *$:/core/macros/toc* Find this line : *\define toc-tabbed-external-nav* Yes, this is the correct line for modifying the *toc-tabbed-internal-nav* - as that macro calls it. Find this line: <> Change it to this : <$view field="title"/> Should work! Regards On

[tw5] Re: TOC question

2019-02-06 Thread TonyM
PS All the macros are defined in $:/core/macros/toc and call a macro called toc-caption To clarify 1. the index will have the title, and the selected tiddlers display their caption? 2. the index will have the caption, and the selected tiddlers display their title? The First w

[tw5] Re: TOC question

2019-02-06 Thread David Gifford
Thanks Tony It is toc-tabbed-internal-nav On Wednesday, February 6, 2019 at 6:24:32 PM UTC-6, TonyM wrote: > > David, > > You can modify the shadow tiddler or build a new toc macro for this > purpose, which TOC do you expect to use? > >- toc >- toc-expandable >- toc-selective-expanda

[tw5] Re: TOC question

2019-02-06 Thread TonyM
David, You can modify the shadow tiddler or build a new toc macro for this purpose, which TOC do you expect to use? - toc - toc-expandable - toc-selective-expandable - toc-tabbed-internal-nav - toc-tabbed-external-nav and I would be happy to have a look Regards Tony On Thurs