[pmwiki-users] Cluster: Restrict Page Lists to only "top" groups ($g1)

Sivakatirswami katir at hindu.org
Thu Feb 15 14:09:58 CST 2007


> On Wed, Feb 14, 2007 at 01:49:06AM -1000, Sivakatirswami wrote:
>> OK I installed cluster... marvelous..
> 8-)
> 
>> New challenge: I want to  get a page list where we only
>> have the "top" home page for each cluster.
>> and where home pages follow the default format  of $Group=$Name

[snip
Kathryn Andersen wrote:
> I have two things that help with this.
> One is a very useful $SearchPatterns definition, which lists only group
> home pages:
> 
> $SearchPatterns['group'][] = '/([-\w]+)\.\1$|\.' . "$DefaultName" . '$/';

Naive  admin here; I have yet to study $SearchPatterns
and how to implement them in page lists...

will do that later, but it doesn't get me what I need.

> The other is to take advantage of the $g0 variable, to list only groups
> which have only one part to their name.
> 
> (:pagelist list=group $g0=1 ...:)

OK this works really well:

(:pagelist list=group $g0=1 fmt=#group :)

But there is one Caveat:

if a user creates a new group and a new page like this:

MarvelousCluster.PageListExamples

the group "MarvelousCluster"

does not appear in the list of $g0=1

apparently the recipes requires that a home page
exist in advance:

MarvelousCluster.MarvelousCluster

If I create  that page  and save it only then will

"MarvelousCluster" appear in the page list.

What we need is for "MarvelousCluster" to appear in the page list
and if I click on it then I get the standard PMwiki prompt that
'the page does not exist and would I like to create:

MarvelousCluster.MarvelousCluster?







More information about the pmwiki-users mailing list