Open rimi opened 3 years ago
Ah i forgot to mention the usecases i was after:
Mirko
Far faster understanding, i quickly created a simple example within your tocP-Shocase: tiddlywiki.zip
Mirko
Hi @rimi .. Thanks for the feedback!!
I think it would be easier to let tocP just call a tiddler that contains an other tocP or toc definition. ... This would let us create very complex structures. ...
I think it would only need some CSS adjustments. ...
I didn't have looked at your code yet. ... I'll do so soon! Thx. again!
I think it would be easier to let tocP just call a tiddler that contains an other tocP or toc definition. ... This would let us create very complex structures. ...
I think it would only need some CSS adjustments. ...
Interesting approach, but i don't get in depth ;). You mean to add a node that itself contains a <<tocP...>>
-macro in some of its field? What would happen if there was some other text around that macro? Most probably you refer to a special tocP-field and not the text, right?
Interesting approach, but i don't get in depth ;). You mean to add a node that itself contains a <
>-macro in some of its field? What would happen if there was some other text around that macro? Most probably you refer to a special tocP-field and not the text, right?
I was thinking about a tocP macro in the text field. ... I did a different experiment with a modified toc macro 2017 .. But it was a bit hacky. see the zip toc-merge-experiment-v0.0.2-all.json.zip You should import it into a default empty.html for testing.
I called the config field: "merge" ... But tocP would prbably need a slightly different approach.
tocP will also need some refactoring, since it still uses the "old" """$param$""" approach. .. New toc uses <<__param__>>, which is a variable. ...
@rimi ... I'm not 100% sure, what you want to achieve. ... Can you be mores specific here?
There some more open issues https://github.com/wikilabs/plugins/issues?q=is%3Aissue+is%3Aopen+label%3Atocp ... that I probably should have a closer look at. ...
Hi Mario
as i had the need to support connecting of multiple of your tocP-trees within arbitrary locations of other trees i enhanced your implementation to support that too. At the moment i only implemented it for 'tocp' and 'tocP-selective-expandable' but at least one of the other implementations i quickly looked above uses methods i already adapted.
To "hook" another tree into an existing, a node just needs to define a list of a list of other field-names (starting with the keyword 'root' as usual for your trees) inside a field called 'tocp.treelinker.fields' (centrally defined and adaptable via macro). the according trees are than hooked into the outer. Own children are also rendered and your "add-children" function natively uses the right field-name inside of the according tree.
Hope you find it useful!
Regards, Mirko