[pmwiki-users] Question about expanding menu (w/o additional scripts) :)
Vladimir Grigor
vgrigor at gmail.com
Fri Sep 14 09:52:56 CDT 2007
Hi dear All! Need you help...
I want to implement 2 level menu in sidebar. 2nd level items link to
pages in corresponding groups.
Suppose there are these pages in wiki:
Main.Homepage
Research.Research
Research.Projects
Research.Funding
Research.Join us
Contacts.Contacts
And if user is on Main.Homepage (s)he sees following menu:
-------
Homepage
Research
Contacts
=======
But if user browses pages in group Research (Research.*) then menu is this:
-------
Homepage
Research
*Projects
*Funding
*Join us
Contacts
=======
I've read (probably) all (and recipes in cookbook.menues also) what I
could find about "expanding menu". It should be possible to do it by
Local Templates mechanism.
I try to implement it in the following way:
-------- code in Site.SideBar starts
%sidehead% [[Main/HomePage]]
(:pagelist fmt=#sidebar order=title name=Research.*,-HomePage :)
* [[Contacts.Contacts]]
========= code ends
-------- code in Site.LocalTemplates starts
[[#sidebar]]
(:template defaults order=name:)
(:template first :)
%sidehead% [[{=$Group}]]
(:template each:)
* [[{=$Name}]]
[[#sidebarend]]
========= code ends
There is only one problem with this code - it doesn't work :)
Suggestions, please...
More information about the pmwiki-users
mailing list