[pmwiki-users] Using page text variable with the search action

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Fri Mar 28 07:38:14 CDT 2008


Ok, so what I did was to add this handler to my local stuff:

-------------------------------------------------------------
SDV($HandleActions['pagelist'], 'HandlePageList');
function HandlePageList($pagename) 
{
  global $PageStartFmt, $PageEndFmt, $SortField;

  foreach ($_GET as $key => $value)
    $getstr .= $key."=".$value." ";
    
  $result = FmtPageList('$MatchList', $pagename, array('o' => $getstr));
  
  SDV($HandlePageListFmt,array(&$PageStartFmt, MarkupToHTML($pagename, $result), &$PageEndFmt));
  PrintFmt($pagename, $HandlePageListFmt);
  return;
}
-------------------------------------------------------------

So now I can control pagelist from the URL like this:

/index.php?n=Equipements.accueil&action=pagelist&group=equipements&fmt=Template%23listbytype&$:Type="GPS"

Pierre 

>-----Message d'origine-----
>De : pmwiki-users-bounces at pmichaud.com 
>[mailto:pmwiki-users-bounces at pmichaud.com] De la part de Pierre Racine
>Envoyé : 27 mars 2008 14:33
>À : pmwiki-users at pmichaud.com
>Objet : [pmwiki-users] Using page text variable with the search action
>
>Hi,
>
>I would like to build URLs for searching pages having page text
>variables defined to a certain value. I expected something like:
>
>/index.php?n=Equipements.accueil&action=search&$:Type=GPS
>
>to return a page of pages having the variable "Type" defined to "GPS" -
>using (:Type: GPS :) - but this does not seems to work.
>
>I guess the "$:" part of the URL is messing this up.
>
>Any idea?
>
>Pierre
>
>_______________________________________________
>pmwiki-users mailing list
>pmwiki-users at pmichaud.com
>http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>



More information about the pmwiki-users mailing list