[pmwiki-users] Need help with custom search pattern

Patrick R. Michaud pmichaud at pobox.com
Wed Nov 9 07:27:39 CST 2005


On Wed, Nov 09, 2005 at 01:37:45PM +0300, Leigh Hausman wrote:
> I'm trying to brutally hack in some semblance of a collection of  
> associated groups by creating groups named as follows:
> 
> Group
> Group-Alt1
> Group-Alt2
> Group-Alt3
> 
> I can do this:
> 
> $SearchPatterns['startswithcurrent'][] = '/Group?/';
> 
> ... and it works, but I'd like to pull the group name automagically:
> 
> $MyGroup = FmtPageName('$Group',$pagename);
> $SearchPatterns['startswithcurrent'][] = '/$MyGroup?/';
> 
> ... but that isn't working. Could an expert enlighten me? Or is there  
> a better way to do this?


    $SearchPatterns['startswithcurrent'][] = '/^$Group/';

will display all pages that are in groups that begin with the same
name as the current one.

Pm




More information about the pmwiki-users mailing list