[pmwiki-users] pagelist for group default pages
Kathryn Andersen
kat_lists at katspace.homelinux.org
Thu Nov 8 19:45:33 CST 2007
On Thu, Nov 08, 2007 at 02:29:12PM -0600, Patrick R. Michaud wrote:
> On Thu, Nov 08, 2007 at 08:08:07PM +0000, Hans wrote:
> > Thursday, November 8, 2007, 7:42:06 PM, Patrick R. Michaud wrote:
> >
[snip]
> > > and then (:pagelist list=homes:) returns a list of any group "home"
> > > pages that fit the Group.Group or Group.$DefaultPage naming pattern.
> Ah, yes, PCRE doesn't understand the $1 syntax, it's still using
> the older \1 syntax. Try this one instead (demonstrated
> at http://www.pmwiki.org/wiki/Test/HomeList ):
>
> $SearchPatterns['homes'][] = "/^($GroupPattern)\\.(\\1|$DefaultName)$/";
>
Yes, I've been using something like this for quite a while, to refer to
group home pages. I called it 'group' rather than 'homes'.
This is what I've been using:
$SearchPatterns['group'][] = '/([-\w]+)\.\1$|\.' . "$DefaultName" . '$/';
Which is very similar (though it didn't occur to me to use
$GroupPattern for the group part).
I find it invaluable, and would appreciate having something like it in
the core.
My only concern would be -- would this break if someone redefined
$DefaultName? (I set my $DefaultName to 'Index' rather than
'HomePage').
Kathryn Andersen
--
_--_|\ | Kathryn Andersen <http://www.katspace.com>
/ \ |
\_.--.*/ | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
v |
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe
More information about the pmwiki-users
mailing list