[pmwiki-users] excluding some pages

Petko Yotov 5ko at 5ko.fr
Sat Jan 2 22:46:48 CST 2010


On Friday 01 January 2010 01:59:03, Piotr A. Dybczyński wrote :
> I have managed this by including on each such a page custom variable:
> 
> (:Status: HIDDEN:)
> 
> And then, in my "What's new?" page I use for example:
> 
> (:pagelist trail=Stud.RecentChanges $:Status=-HIDDEN count=5 fmt=#titlep
> order=-time:)
> 
> Now the problem: I want to add a search box, but pages with $Status=HIDDEN
> should not be searched.
> 
> I tried several syntax in (:searchbox:) directive but none was successful
>  in excluding pages with this variable set.

Hello. You probably need to add the additional search parameters in the 
(:searchresults:) directive like this:

(:searchbox:)
(:searchresults $:Status=-HIDDEN:)

If you don't want with the search results to be displayed such a line:
  Results of search for group=Main $:Status=-HIDDEN query: 

then, instead of "(:searchresults...", use "(:pagelist request=1 req=1...".

Usually, the search results page in PmWiki is [[Site.Search]], or it may be 
localized like [[PmWikiPl.Szukaj]], where you can modify the (:searchresults:) 
directive. Or, if the page with the searchbox contains (:searchresults:), this 
page will be used for displaying the results.

Thanks,
Petko



More information about the pmwiki-users mailing list