[pmwiki-users] Foxreplace syntax

Hans design5 at softflow.co.uk
Sun Jan 20 08:57:07 CST 2008


here is another working example of fox replace code:

This fox form uses the markup expression {(grep ...)}
see http://www.pmwiki.org/wiki/Cookbook/TextExtract for download and
installation.

The form offers to be a general text extraction tool. Here it is:

>>frame width=25em<<
(:fox form  foxaction=replace put=overwrite target={*$FullName}#extract:)
(:input default request=1:)
(:foxtemplate "{$$(grep '{$$search}' {$$pages} cut={$$cut} hide={$$hide} fmt=link )}":)
|| Search for:||(:input text search size=30:) ||
|| On pages:||(:input text pages size=30:) ||
|| Cut lines:||(:input text cut '' size=30:) ||
|| Hide text:||(:input text hide '' size=30:) ||
|| ||(:input submit post Enter:) (:input submit cancel Cancel:) ||
(:foxend form:)
>><<

[[#extract]]
dummy
[[#extractend]]

The form posts to the same page.
'dummy' will be replaced (overwritten) on first use with the output from the grep
markup expression. This will be evaluated when the form is posted.
Therefor it is in the template with the syntax {$$(grep .....)} and is
populated from the form fields.


  ~Hans




More information about the pmwiki-users mailing list