[pmwiki-users] Table of Contents (Was: picks up Q:-markup)

John Rankin john.rankin at affinity.co.nz
Thu Jan 27 14:29:43 CST 2005


On Thursday, 27 January 2005 3:54 AM, chr at home.se wrote:
...
>> So my question back is: Do you want to deactivate this
>> 
>> - for all questions
>> 
>> - for some questions
>> 
>> - on all pages
>> 
>> - on some pages
>
>In this particular case I had lots of sections and I didn't want any 
>questions to make it into the list. OTOH, wiki.lyx.org would probably want 
>questions to be included in the TOC for at least the FAQ-group.
>
>So the answer would be that I'd want questions (Q:) to be included on some 
>pages, but not on all. 

Ah!
Download and install the latest version of pagetoc.php from
http://www.pmwiki.org/wiki/Cookbook/PageTableOfContents

Set up 2 test pages, both with some Q: markup.

On one page, put (:toc:) as usual.
This should include Q: markups.

On the other put (:toc Q:) (no spaces between the Q and :)
This should exclude Q: markups.

Now edit config.php and add the following line:
    $OmitQMarkup = true;

The page with (:toc:) should now omit Q: markups.

The page with (:toc Q:) should now include Q: markups.

I think this meets the requirement. Please check the 
generated anchor numbering carefully -- it's possible
that this change has broken the code somewhere.

Other features, such as Q* overrides the $OmitQMarkup value,
could be added if there is a need. But at the moment such 
capabilities appear to be superfluous.

Questions? Comments?
-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list