<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="RIGHT: auto">I have created a page that acts as a template using multiple (:include :) for each of various pages.  </div>
<div style="RIGHT: auto">The idea is that I have multiple companies A, B & C and each has Products, Support and Contacts</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">I use the PMWiki sidemenu to embed into the link url the specific name of the company.  </div>
<div style="RIGHT: auto">Something like: Comp/0?CompSName=RMS</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">My template page "0" can then include:</div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto" class=tab>     </SPAN>RMSProducts, RMSSupport and RMSContacts or </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto" class=tab>     </SPAN>XYZProducts, XYZSupport and XYZContacts</div>
<div style="RIGHT: auto">as appropriate.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Each include automatically has an EDIT button which will allow editing of ONLY that subcategory (XYZProducts or RMSContacts, as appropriate).  This ensures users cannot modify the master template and only edit specific content.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">All works well, until...  I save after the edit.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">As you know a SAVE takes you back to the page you were editing.  Since this is only subcontent, I want to be returned to my template BUT in order to return to my template and populate the content I need to somehow preserve either a page text variable or the url variable.  To use $EditRedirectFmt I need to preserve my paramenter to encode it on the redirect url.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">I can preserve the parameters in the url all the way to my custom EditForm which looks like so...</div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto" class=tab>     </SPAN>Comp.0RMS-Product?action=edit&CompSName=RMS</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Now comes the place where I pull out my hair.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">I cannot figure out how to create a global variable that is preserved nor can I figure out how to preserve the parameters in my url when I redirect(either one would be sufficient).</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">I have tried everything I can think of and there is one perplexing problem.  It's the fact that a global variable seems unaffected.  Here is a sample of what I am doing with output noted.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto" class=tab>     T</SPAN>his line is in my EditForm   (:CompSName: RMS :)</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto" class=tab>     and these are in my config.php</SPAN>    <BR>          SDV($CompSName, 0);<BR>          Markup('CompSName','<{$var}','/\\(:CompSName: (<A href="file://\\w">\\w</A>+) :\\)/e','CSName("$1")');<BR>     <BR>          function CSName ($val) {<BR>             global $CompSName;<BR>             $CompSName = $val;<BR>             echo " #A- ".$CompSName;                 //output = RMS<BR>         
 }<BR>     <BR>          echo " #B-".$CompSName;                     //output = 0</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Why isn't my global variable preserved?  It is set correctly in the function but outside the function it is set to 0, either as if it's never been changed or as if SDV function is changing it back to 0. (When I remove the SDV function it still not not function).</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Is there a way to get a value back from the EditForm to the redirected page?</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Sorry if this is long or confusing.  I tried to simplify as much as possible.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Dave</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">PS - Using PMWiki 2.2.19 runing with PMWiki PHP server.<VAR id=yui-ie-cursor></VAR></div></div></body></html>