On Friday, December 9, 2016 at 11:50:19 AM UTC+1, PMario wrote:
>
> On Friday, December 9, 2016 at 9:12:39 AM UTC+1, HC Haase wrote:
>>
>>
>> *Maybe that could be implementet in the core PMario??? sould that be a 
>> github request?*
>>
>
> I did already experiment with a mechanism that reads a field from "branch 
> tags" ...  but I stopped as Riz has come up with his idea, since it's 
> elegant.
>

And the code complexity exploded :/
 

> I'm still in favor of the idea, to "merge" different TOCs into one tree, 
> where every TOC also can live on its own. IMO thats necessary, to avoid 
> duplications. And I think it will make the code simpler. 
>

I do have a working prototype, that works with a "merge" field. ... 
I'm not sure if the name is the right one. May be "include", "toc-include" 
or even "toc-transclude" would be better. The mechanism that's used is the 
transclude-widget. .. So may be "toc-transclude" may be the right name. 

The structure is as follows: eg:

tiddler: toc-1: <<toc-selective-expandable tag:"root">> .. use standard 
sorting
tiddler: toc-2: <<toc tag:"journal" sort:"sort[created]">> .. 

structure: 

 - a .. tagged: root
   - aa .. tagged: a
   - bb .. tagged: a    field:toc-include:toc-2
      - bbb .. tagged bb .. Will not be shown!! toc-include stops the 
default behaviour
 - x .. tagged: root

The cool thing now is, that bb can link to everything. So if toc-2 contains 
an other TOC .. fine. If not, the text of the tiddler will be shown. ... 
There are a lot of new possibilities. 

What do you think? ... _and_ should this be part of the core? @Jermolene?

---------------

The actual plan for the core toc refactoring is: 

 - Implement the "infinite recursion" protection as in the github PR 
<https://github.com/Jermolene/TiddlyWiki5/pull/2650>: 2650
 - Implement TOC "auto selection" depending on "latest tiddler" shown. ... 
To Be Done

have fun!
mario


-- 
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/286d9fd0-6f3b-484f-8a4b-056bda48fce2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to