<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks Patrick.<br>
<br>
Peter, I've added a "preg_match" alternative to filtering out the
include_once for template pages, at
<a class="moz-txt-link-freetext" href="http://www.pmwiki.org/wiki/Cookbook/EditMX#installation">http://www.pmwiki.org/wiki/Cookbook/EditMX#installation</a>, ie<br>
<br>
<pre class="escaped">$EditTemplatesFmt = '$Group.Template';
if (!preg_match('/.*Template$/',$pagename))
        include_once('cookbook/EditMX.php');</pre>
My test template page now reads:<br>
<br>
==============start<br>
<br>
Tomorrow's date is {ROE(ftime "%B %d, %Y" tomorrow)}<br>
<br>
==============end<br>
<br>
Saves, edits, and works as a template, like a charm!<br>
<br>
Best,<br>
<br>
- Henrik<br>
<br>
Patrick R. Michaud wrote:
<blockquote cite="mid:20080505121453.GB21983@host.pmichaud.com"
 type="cite">
  <pre wrap="">On Sun, May 04, 2008 at 05:36:47PM -0400, Henrik Bechmann wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Patrick,

It appears that ROEPatterns (unexpectedly) changes text on save, not 
just on load, when in scope of the ROE pattern. Is this as designed?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Yes, this is as designed.  A ROS pattern should be replaced only
when someone saves a page, so that repeatedly hitting preview will
continue to show the non-replaced markup.

A ROE pattern should do the replacement when someone hits preview.
However, it should also do the replacement if someone never hits
preview -- i.e., if someone enters a ROE pattern and goes directly 
to save without hitting preview, then the replacement should 
still take place.

Pm

  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 

Henrik Bechmann
bechmann.ca
Webmaster, celos.ca webhosting services</pre>
</body>
</html>