[pmwiki-users] Default pagelists to list pages in current group only.

Captain Smack captainsmack at mail.com
Tue Sep 4 17:54:29 CDT 2007


> > How do I make it so that (:pagelist:) only lists pages from the 
> > current group? As of now I have this in my local config.php to 
> > exclude special pages:
> >
> > ## Exclude Certain pages / groups from search results.
> > $SearchPatterns['default'][] = 
> > '!\\.(All)?Recent(Changes|Uploads|Comments)$!';
> > $SearchPatterns['default'][] = 
> > '!\\.Group(Print)?(Header|Footer|Attributes)$!';
> > $SearchPatterns['default'][] = '!\\.(Left|Right|Side)(Bar|Menu|Note)$!';
> > $SearchPatterns['default'][] = '!^Site\\.!';
> > $SearchPatterns['default'][] = '!^PmWiki\\.!';
> >
> > but I'd also like to have (:pagelist:) act like (:pagelist group={*$Group}:)


> In local/config.php:
> 
> $pagename = ResolvePageName($pagename);
> $group = PageVar($pagename, '$Group');
> $SearchPatterns['default'][] = "/^$Group\\./";
> 
> This causes the default pagelist to display only those pages
> that are in the current group. (The difference is the use of
> a slash versus an exclamation point for the pattern -- an exclamation
> point indicates patterns to be excluded, a slash indicates
> patterns that are required.)
> 
> Pm

I tried this:

$pagename = ResolvePageName($pagename);
$group = PageVar($pagename, '$Group');
$SearchPatterns['default'][] = "/^$Group\\./";

in local/config.php and now (:pagelist:) returns nothing at all. I also tried it on a fresh
install of PmWiki, with nothing else in the config file, but it still
didn't work.

-- 
We've Got Your Name @ www.mail.com!!!
Get a FREE E-mail Account Today - Choose From 100+ Domains




More information about the pmwiki-users mailing list