[pmwiki-users] Search function query

Sandy pmwiki at onebit.ca
Mon Apr 9 11:28:02 CDT 2007


ABC XYZ <anon.catch <at> gmail.com> writes:

> 
> Hi,
> I am working on a content management project.(Using PHP for the first
> time). I have managed to add the search button to the skins tmpl file
> and it dislays fine on my web page but I have no clue as to how to
> activate this function.


There are two ways to do a search box. You lucked out and chose the more
difficult method, putting it in the skin. I know the default skin used to do
this, so you're in good company.

The easier way is to use the (:searchbox:) directive in a page such as
Site.PageActions or Site.SideBar. You can use parameters to prevent them from
searching the documentation pages.

In my CMS system, I put the following in the sidebar. The first one is seen by
visitors and does not search the documentation or the Site pages. The second one
is only seen if you log in with edit privileges.

(:searchbox group=-PmWiki,-Site size=15 label=Search:)

(:if auth admin:)
(:searchbox size=15 label=DocSearch:)


BTW, searchbox is now related to pagelist. Very flexible and powerful directive!

Cheers!

Sandy





More information about the pmwiki-users mailing list