]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - doc/plugins/toc/discussion.mdwn
compile could have done this as well
[git.ikiwiki.info.git] / doc / plugins / toc / discussion.mdwn
index 287ba5656cfc2a4bc517683970f3e25118f14070..e704eee55fe1dd97e10b6c34190fd1a54021bd6f 100644 (file)
@@ -10,7 +10,7 @@ Why doesn't the TOC appear in the edit page preview?  It only appears when the p
 > Fixed. --[[Joey]]
 
 Just ran into a side effect of `\[[!toc]]` being a NOP in pages
-which are inlined: pages with `\[[!template id=note text="\[[!toc]]"]]`
+which are inlined: pages with `\[[!template id=note text="[[!toc]]"]]`
 wound up having the note rendered in feeds as "Use this template
 to insert a note into a page". Worked around this by making a local
 copy of the template and removing its `<TMPL_UNLESS text>...</TMPL_UNLESS>`
@@ -18,9 +18,16 @@ section. Besides needing to generate guaranteed-unique anchor names,
 are there other reasons this directive couldn't be made to work on
 inlined pages?  --[[schmonz]]
 
-> Workaround: `\[[!template id=note text=" \[[!toc]]"]]`
+> Workaround: `\[[!template id=note text=" [[!toc]]"]]`
 > (with whitespace) should work, because then Perl will consider
 > the string to be a true value.
 >
 > Longer-term, my branch on [[bugs/template_creation_error]]
 > aims to fix this sort of thing. --[[smcv]]
+
+>> Workaround seems not to. Maybe whitespace is getting trimmed
+>> along the way and it stays falsish. Interested in your branch;
+>> sorry I can't offer precise feedback right now, but it looks sane
+>> at a glance. --[[schmonz]]
+
+How could this be tampered to make another plugin that would enable partial listing so I could make multiple "subTOCs" in the same page? For instance I'd have a `\[[!toc startlevel=1 levels=1]]` in the top of the page while after a level 1 heading I would have a `\[[!toc startlevel=2]]` with the level 2 and below headers limited by the ones below this particular level 1 header --[[iuri]]