[pmwiki-users] figuring out table of contents location

John Rankin john.rankin at affinity.co.nz
Mon Jul 30 05:33:16 CDT 2012


> On Jul 29, 2012 1:42 AM, "John Rankin" <john.rankin at affinity.co.nz> wrote:
>>
>>
>> > In Site.GroupHeader, I have the following:
>> >
>> > (:description {*$:Summary}:)(:toc-hide:)
>>
>> How do you tell pmwiki to include Site.GroupHeader in
>> {$Group}.GroupHeader?
>>
>
> I use a version of Cookbook:AllGroupHeader in local/config.php.

OK. If you can change

$GroupHeaderFmt =
  '(:include {$SiteGroup}.AllGroupHeader:)(:nl:)'
  .'(:include {$Group}.GroupHeader:)(:nl:)';

and instead use:

$GroupHeaderFmt =
  '(:toc-hide:)(:nl:)'
  .'(:include {$Group}.GroupHeader:)(:nl:)';

then a small change to pagetoc would work:
>>
>> function RemoteTableOfContents($pagename,$ref,$self=0) {
>>     global $TocHeaderFmt,$RemoteTocFmt;
>>
>>     global $GroupHeaderFmt;
>>
>>     ...
>>     $toctext= $GroupHeaderFmt . @$tocpage['text'];
>>
>>    ...
>> }
>>
>
> Maybe what I'm after isn't quite clear. For this design, I want a
> top-level
> toc to appear in an aside (think sidebar, but nothing else). I want this
> on
> every page, but rather than having to include (:toc-hide:) on every page
> in
> the wiki, I want to have in one place.

The above change should achieve this.

> I would like it to include all
> heading displayed, not just those in the page text itself.

I am not following what this means. What headings are left out when (as
pagetoc does) we display the headings found in the page text?

JR
-- 
John Rankin




More information about the pmwiki-users mailing list