[pmwiki-users] page lists for dynamic menus

Tegan Dowling tmdowling at gmail.com
Fri Mar 21 09:12:36 CDT 2008

On Fri, Mar 21, 2008 at 8:44 AM, Hans <design5 at softflow.co.uk> wrote:
> Friday, March 21, 2008, 12:53:33 PM, Marco Ferretti wrote:
> > What I would like now is that the order of the groups stays the
>  > default one ( alphabetical ) and the current group is exploded
>  (:pagelist fmt=#explgroup:)
>  [[#explgroup]]
>  (:template first {=$Group}:)
>  * [[{=$Group}/]]
>  (:template each:)
>  (:if equal {$Group} {=$Group}:)
>  ** [[{=$Group}/{=$Namespaced}]]
>  (:if:)
>  [[#explgroupend]]

Optional alternatives/enhancements:

__Control which pages in each group are listed__

You could tag each desired page with a hidden term that will never
otherwise appear, like (:comment dosidelist:)
and then your pagelist could be (:pagelist fmt=#explgroup dosidelist:)

OR tag each page that you *don't* want listed with a hidden term, and
exclude those: (:comment donotsidelist:) and (:pagelist fmt=#explgroup

OR create a custom list in local\config.php, and specify that in your pagelist:

I have this in all of my config.php files:  		

		$SearchPatterns['forum'][] = '!\.(All)?Recent(Changes|Uploads|Comments)$!';
		$SearchPatterns['forum'][] =
		$SearchPatterns['forum'][] =
		$SearchPatterns['forum'][] = '!\.Template$!';
		$SearchPatterns['forum'][] = '!\.HomePage$!';

This prevents the "hardware pages" of a wikigroup from being listed --
as would be appropriate if the group were a forum, and each page a
topic -- so
(:pagelist fmt=#explgroup list=forum:) would exclude the group's
RecentChanges, RecentUploads, RecentComments, GroupHeader,
GroupFooter, GroupAttributes, GroupPath, LeftBar (or RightBar or
SideBar or QuickBar), Left(or Right, Side, Quick)Menu, LeftNote,
LeftNotes, LeftTools, Template, or HomePage.

You could even have a different list used, depending on the
authorization level of the viewer:

(:if auth admin:)(:pagelist fmt=#explgroup list=all:)(:if ! auth
admin:)(:pagelist fmt=#explgroup list=forum:)

__Minor alternative__

(:template first {=$Group}:)
* [[{=$Group}/]]
(:template each:)
(:if equal {$Group} {=$Group}:)
** [[{=$Group}/{=$Titlespaced}]]

The difference is that I used ** [[{=$Group}/{=$Titlespaced}}]], as
I'd rather see page titles on that sidebar than page names.

More information about the pmwiki-users mailing list