[pmwiki-users] Formatting search results

ABClf languefrancaise at gmail.com
Tue Nov 30 12:26:32 CST 2010


There a few solutions I guess.

The easy one I know is :
-define a new pagelist fmt using %%newwin...%% param and name it tb
for example (for : target blank)

where you want a seachbox giving results in the format of tb (id,
using the %%newwin%% param), use :
(:searchbox fmt=#tb:)
to get a searchbox that will give results formatted the way #tb is ;

where you want the results of some defined search in the format of tb, use :
(:searchresultats mysearchpattern fmt=#tb:)
to get the results of the search formatted the way #tb is.

In your case, you could create a new page named GuatemalaResults and,
in that page, define a new format and print the results of a search
for the word /Guatemala/. Like this (one can do better, with colors,
and description, lasttimemodified, and other PageVariables and PTV) :

(:if false:)
* %newwin%[[{=$FullName}|+]]%%

(:searchbox Guatemala fmt=#tb:)

On PmWiki doc :
http://www.pmwiki.org/wiki/PmWiki/Links : for link target
http://www.pmwiki.org/wiki/PmWiki/PageLists : PageLists and
http://www.pmwiki.org/wiki/Site/PageListTemplates : PageLists
templates (ie : format)

Hope this helps.


2010/11/29 Steve G. <wordz2u at gmail.com>:
> Is there an easy way to format search results so that clicks open in a new
> window?
> If I were to manually format the results, I would include a %newwin% in
> front of the link, though, of course the link would have to be formatted
> differently that the way it appears in the results of a search.
> In case I am not clear, I want to create a search, say for all the pages on
> my wiki that contain the word Guatemala (the URL of which I will send to
> friends). When someone clicks on the result right now, the links opens
> instead of the search result page. I would like the page to open in a new
> tab or window, so that the user can click all the links one by one, without
> having to navigate back to the search page.
> Thanks!
> Z.
> --
> Check out my web site - www.words2u.net
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users


| A | de la langue française
| B | http://www.languefrancaise.net/
| C | languefrancaise at gmail.com

More information about the pmwiki-users mailing list