[pmwiki-devel] Group.Name pattern
Patrick R. Michaud
pmichaud at pobox.com
Fri Dec 8 13:11:33 CST 2006
On Fri, Dec 08, 2006 at 06:46:06PM +0000, Hans wrote:
> Friday, December 8, 2006, 6:13:09 PM, Patrick wrote:
>
> > Thus:
>
> > # all pages in the Category group, wildcard
> > $list = MatchPageNames($list, 'Category.*')
>
> MatchPageNames may indeed do the work, but how do I specify the
> current group?
>
> This does not work:
> MatchPageNames($targetpage, '{$Group}.*')
>
> Nor does
> $group = PageVar($pagename, '$Group');
> MatchPageNames($targetpage, '$group.*')
...FmtPageName is your friend!
MatchPageNames($targetpage, FmtPageName('{$Group}.*', $pagename))
Also, the $group version above would work if double quotes are used:
$group = PageVar($pagename, '$Group');
MatchPageNames($targetpage, "$group.*")
Pm
More information about the pmwiki-devel
mailing list