[pmwiki-users] searchbox not allowing use of ptvs or required words

Petko Yotov 5ko at 5ko.fr
Wed Apr 27 04:56:17 CDT 2011

On Friday 22 April 2011 17:37:09, adam overton wrote :
> am i correct that it is the natural of behavior of searchbox to not
> recognize ptvs or require individual words as one can specify in
> pagelists?
> for instance:
> (:pagelist -_hide ... :) (:pagelist $:hide=-?* ...:)
> .. both work, and don't list any page with _hide or (:hide: 1:) on the page
> (:searchbox -_hide ...:) (:searchbox $:hide:-?* ...:)
> .. don't work
> if so, any simple workaround to this?

Set in config.php something like:

  $MakePageListOpt['$:hide'] = '-?*'; # as if we had $:hide=-?* in pagelists
  $MakePageListOpt['-'][] = '_hide';  # as if we had -_hide in the searchbox

Note that the first line can be overriden from a page by actually using the 
$:hide= parameter like pagelist $:hide=1, while the second line cannot be 
overridden, it will permanently exclude from listings any page containing 
"_hide", eg. (:pagelist _hide:) will find nothing.

Otherwise, the searchbox can have a "value" parameter, but that's probably not 
what you want:

  (:searchbox value="$:hide=-?* -_hide":)


More information about the pmwiki-users mailing list