[pmwiki-users] New Recipe: EditMX

Hans design5 at softflow.co.uk
Tue May 6 08:37:06 CDT 2008

Sunday, May 4, 2008, 10:05:50 PM, Peter & Melodye Bowers wrote:

> Note the slight change in the installation instructions so that template
> editing will be effective.

> This new capability gives the capability for any Markup Expression to be
> used as a sort of "macro" in your templates, making them dynamic templates
> instead of static templates.

{ROS(expression...)} is a nice little trick! Thanks!

It is a pity the installation requires exclusion of template pages,
otherwise it would be good addition for powertools.

The example on http://www.pmwiki.org/wiki/Cookbook/EditMX :

  {ROS(pagelist group=Test wrap=inline fmt=#simple)}

mentions extra new lines on output.
I have now updated powertools.php to remove these.
See http://www.pmwiki.org/wiki/Cookbook/PowerTools

Regards to templates note that if you use Fox
then use of {ROS(expression..)} in  Fox form templates
is not necessary, as Fox can evaluate any markup expression
on form submission by using the syntax {$$(expression...)} in the

So for instance instead of using once

   {ROS(pagelist group=Test wrap=inline fmt=#simple)}

to generate a static page list, you coukld add a form, which will
create a static page list and lets you update it whenever you want, by
clicking the button again:

(:fox frm foxaction=replace put=overwrite target=#pagelist:)
(:foxtemplate "{$$(pagelist groupTest wrap=inline fmt=#simple)}":)
(:input submit post 'Update Pagelist':)
(:foxend frm:)


The pagelist will be added between the anchors, and future updates will
overwrite the list.


More information about the pmwiki-users mailing list