Thanks very much Hans and Peter.<div>I&#39;ll work in these solutions as soon as I can.</div><div><br></div><div>Is there a way I can test and only do this if the page is being saved (rather than browsed, previewed, etc)</div>
<div><br></div><div>Simon</div><div><br></div><div><br><br><div class="gmail_quote">2009/9/28 Hans <span dir="ltr">&lt;<a href="mailto:design5@softflow.co.uk">design5@softflow.co.uk</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Sunday, September 27, 2009, 7:10:57 PM, Simon wrote:<br>
<br>
&gt; I want a variable associated with a particular wiki page<br>
&gt; (cf {PageName$PageVariable} or {PageName$:PageTextVariable}<br>
<br>
&gt; that is set by the recipe and saved as part of the page contents.<br>
<br>
</div>in your function you need something like this:<br>
  //first get the page text content<br>
  $page = RetrieveAuthPage($pagename, &#39;edit&#39;, true);<br>
  if (!$page) Abort(&quot;?cannot edit $pagename&quot;);<br>
  $newpage = $page;<br>
  $text = $page[&#39;text&#39;];<br>
<br>
  //do something to $text<br>
  //$key is name of PTV, $val is PTV value<br>
  //adding a PTV:<br>
  $text .= &quot;\n(:$key: $val:)&quot;;<br>
<br>
  //saving the page with the modified $text<br>
  $newpage[&#39;text&#39;] = $text;<br>
  UpdatePage($pagename, $page, $newpage);<br>
<br>
  //back to view the page<br>
  //redirect is good since we updated or added a PTV<br>
  //and want to see the change immidiately<br>
  Redirect($pagename);<br>
  //end of function<br>
<br>
  //or alternatively<br>
//  HandleDispatch($pagename,&#39;browse&#39;);<br>
//  exit;<br>
  //end of function<br>
<font color="#888888"><br>
Hans<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>____<br><a href="http://kiwiwiki.co.nz">http://kiwiwiki.co.nz</a><br>
</div>