[pmwiki-users] categories in pagelist

J. Meijer commentgg at hotmail.com
Mon Apr 2 11:35:38 CDT 2007


On 4/1/07, Petko Yotov <5ko at free.fr> wrote:On Sunday 01 April 2007 18:21, Manfred Schreiweis wrote:> Hi,Currently we can not search for more than one page in the "link=" parameter,so in the third example "link=Cat1,Cat2" is just ignored. It would be reallynice though, Patrick, if that became possible (also withnegatives "link=Cat1,-Cat2").PetkoPetko, you can have multiple links matched in pagelists, if you're willing to patch function PageListTermsTargets() in pagelist.php: Replace the section beginning with       if (@$opt['link']) {  With:      if (@$opt['link']) { #!# JM-mod        if(!is_array($opt['link']))          $opt['link']=explode(',',$opt['link']);        $link=array();        foreach($opt['link'] as $l) {          $link[] = MakePageName($pn, $l);          $indexterms[] = " $l ";        }        $opt['=linkp'][] = "/(^|,)".implode('|',$link)."(,|$)/i";      }I believe this can be turned into a recipy after recent pagelist.php refactorings. Usage example:   (:pagelist link=Grp1.Page1,Grp2.Page2 :)I hope no recipy is need, but that this instead gets included into pmwiki. /jm
_________________________________________________________________
It’s tax season, make sure to follow these few simple tips 
http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=WLMartagline
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20070402/98e4b586/attachment.html 


More information about the pmwiki-users mailing list