[pmwiki-users] Cluster in Pagelists- Getting 1st Level Groups only

Sivakatirswami katir at hindu.org
Sat May 12 04:50:08 CDT 2007


Kathryn Andersen wrote:

> 
> In local/config.php:
> #make a group-only Group.Group search pattern
> $SearchPatterns['group'][] = '/([-\w]+)\.\1$|\.' . "$DefaultName" . '$/';
> 
> In your wiki page:
> (:input form:)
> (:pagelist group=-Pmwiki,-Site,-Team,-TODO*,-XToDo* list=group $g0=1 fmt=#jumpbox:)
> (:input end:)
>  
> This would give you a list of the top-level groups (but only those
> groups which actually have home pages).
> 
> If that isn't what you want, then I've probably misunderstood.

You understood correctly.. and I added the $SearchPatterns line to 
farmconfig.php
and all is well. Note that I have not upgraded anything for 4 months
so, for some reason it worked before without Search patterns, but now
it requires it... problem solved. Thanks

But I can't get #hgtitle2 to work

(:pagelist group=-Pmwiki,-Site,-Team,-TODO*,-XToDo* list=group 
fmt="#hgtitle2":)

gives us, just toplevel Group.Group links, and no nesting of the
expected:

Group.Group
	Group-Level1.Group-Level1

I just get:

# BdEditorials
# CaptionWriter
# Cybertalks
# Fix
# FormsTesting
# Games
# GITA
# HAP
# HHE
# HTDE
# Javascript
# Lexicon
etc.

So, I am still missing something on that one.  Though, the list would
be so long I'm not sure how useful it would be. But it would make a
possible "cool" site map, but in which case I would need *all* levels
(I think the maximum we have going now is 3...)

project-workarea-documentation.project-workarea-documentation

So it would need to handle any number of levels I'm pretty sure
we would never go beyond 4 though, as the names get so long
as to be unwieldy and awkward in displays.

Anyway, Cluster is Marvelous (smile)

skts

> 
> ----
> !!!fmt=#hgtitle2
> 
> Two-level list of groups (showing title), giving nested hierarchical
> groups of top two levels; assumes that list=group
> 
> [@
> [[#hgtitle2]]
> (:template defaults order=group list=group:)
> (:template first {=$g1}:)
> (:if equal "{=$g0}" "1" ):)
> *[[{=$Group}.|{=$GroupTitle}]]
> (:ifend:)
> (:template first {=$g2}:)
> (:if ( equal "{=$g1}" "{*$g1}" and equal "{=$g0}" "2" ) :)
> **[[{=$Group}.|{=$GroupTitle}]]
> (:ifend:)
> [[#hgtitle2end]]
> @]
>  
> Note that this requires the $SearchPatterns setting that I gave above.



More information about the pmwiki-users mailing list