[pmwiki-users] TextExtract (Search recipe) update

Hans design5 at softflow.co.uk
Thu Sep 17 05:34:09 CDT 2009


TextExtract version 2009-09-17 is released now,

which addresses some bugs in vertical spacings,
and, perhaps more importantly, makes it possible
to use (:pagelist ..... fmt=#extract:)

One needs to set up a custom pagelist template for this,
on one line (remove all line breaks), like:

[[#extract]](:template first:){(extract dummy (:template each:) {=$FullName}
(:template last:) phead=link header=full pagelist=1)}
[[#extractend]]

Similar a PmWiki searchbox can be used with that template,
for instance:

(:searchbox group=PmWiki fmt=#extract:)

(:searchresults:)

With the template above both (:pagelist fmt=#extract:) and
(:searchbox fmt=#extract:) will supply TextExtract with a list of
source page names, so TextExtract() is called just once, not for each
source page as with the previous pagelist template.

Another option using TextExtract as a markup expression is in
combination with PowerTools (pagelist ...) MX.
In this case you need to give the search terms as first argument,
like
{(extract 'search terms' (pagelist ....) )}


  ~Hans




More information about the pmwiki-users mailing list