[pmwiki-users] figuring out table of contents location

tamouse mailing lists tamouse.lists at gmail.com
Tue Jul 31 20:41:09 CDT 2012


On Jul 30, 2012 3:33 AM, "John Rankin" <john.rankin at affinity.co.nz> wrote:
>
>
> > 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
>

I'll give it a go when I return from vacation. Thanks, John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20120731/1c727071/attachment.html>


More information about the pmwiki-users mailing list