[pmwiki-users] Fox preview syntax

Hans design5 at softflow.co.uk
Mon Jun 15 17:01:00 CDT 2009

Monday, June 15, 2009, 2:03:20 AM, Randy Brown wrote:

> Hans, Thanks for the explanation. I tried what you suggested. It
> works for a single line foxpreviewtemplate. How would I use a
> multi-line template? I tried using previewtemplate= in the markup
> below, but preview made an actual post. 
> .....[snip]

yes, you are right. As a ptvtarget is set, Fox will update PTVs there,
despite the Preview button clicked. This may perhaps be called  a bug,
or at least not quite desirable.
The problem is that Fox will process for multiple targets, if given,
and multiple Fox actions. Foxpreview will invoke a 'display' action,
but others may be done as well.

Right now I am not quite sure how to prevent this automatically,
by changing the fox.php code, basically preventing any other targets from
being set, including ptv targets, if preview is invoked.

But you can do it 'manually' in the form:
Instead of putting ptvtarget=Group.PageName into the (:fox ...:) markup,
use (:foxptv Group.PageName:) and enclosde it in a conditional like

(:if ! foxpreview:)(:foxptv Group.PageName:)(:if:)

so Fox will only use the ptvtarget given when not previewing.


More information about the pmwiki-users mailing list