2012-03-24, 00:32:08
Thanx for the explanation,
Hm,.. I feared sth like this.
My complicated Idea would be:
1. Instead of adding the ID's when the page is displayed -
you could add the IDs on page-save and write the IDs into the page-content
2. create a new page-field (<TOCindex>) containing an object/multiarray with the headline IDs
and according h2-6 Tag on page save
This way the content filtered before it is called - the template function would only display the menu (or an array for further processing).
Would be killer, sometimes ul's are used in the content to enumerate something which is not a menu ;-)
shawn_a Wrote:So the problem is, if you want to create a menu by function, it has to happen after the content filter runs or you can simply not use that feature of it. If calling by function, I could maybe set a global and do the filter manually, it will occur twice, but cant think of another way at the moment.
Hm,.. I feared sth like this.
My complicated Idea would be:
1. Instead of adding the ID's when the page is displayed -
you could add the IDs on page-save and write the IDs into the page-content
2. create a new page-field (<TOCindex>) containing an object/multiarray with the headline IDs
and according h2-6 Tag on page save
This way the content filtered before it is called - the template function would only display the menu (or an array for further processing).
shawn_a Wrote:I can also add a wrapper or a class to the ul I guess, I don't typically like to do that with plugins, maybe I can make it a user parameter.
Would be killer, sometimes ul's are used in the content to enumerate something which is not a menu ;-)