[pmwiki-users] FAQs and anchors and TOC

Waylan Limberg waylan at gmail.com
Wed Nov 2 13:42:05 CST 2005


I redefined some Q&A markup for my FAQs pages so that each question
(Q:Some question) gets an anchor of "#Some_question". What I would
like to do is add a directive (possibly (:toc:)) to create an
unordered list of all the questions on the page. That way, all the
questions could be listed at the top of the page as links and one
could click to jump to the question and answer lower on the page.

It would be really cool if one could do (:toc pages=Some.Page,
Some.OtherPage) to create a list of all FAQs on all listed pages.
Perhaps (:toc pagelist=Some.PageList:) would be better. Or how about
(:toc group=GroupName:) for a list of all FAQs on all pages in that
group.

Anyway, I have seen a couple references to (:toc:) before, but have
never found an explanation anywhere. I have gotten the feeling in the
past that there is a recipe somewhere that already does this, but
haven't been able to find it. Could someone point me in the right
direction.

If it doesn't exist, I just may do it myself. What would be the best
way to go about collecting all the anchors from a page (or Pagelist or
Group of pages) to build the list of questions? I think that would be
enough to get me started.

--
----
Waylan Limberg
waylan at gmail.com




More information about the pmwiki-users mailing list