Hi All:<br><br>I have a customized page template product which subclasses from ZopePageTemplate. In this product class, I have a method that redirects to a certain fixed page that I have created in the ZMI. One of the objects of this type makes calls to this method and also has some conditional redirects (based on certain request variables). Here is a representation<br>
<br>In my Product class, I have a method which conditionally redirects ...<br><br>def check_and_redirect(self):<br>    request = self.REQUEST<br>    if request.get(&#39;redirect_to_fixed_page&#39;, False):<br>        request.RESPONSE.redirect(&#39;<a href="http://somefixedurl_in_my_domain">http://somefixedurl_in_my_domain</a>&#39;)<br>
<br>def getValue(self):<br>    self.check_and_redirect()<br>    # do some more stuff<br>    ....<br>    ....<br>    return &#39;some value&#39;<br><br>My ZPT looks like this ...<br>...<br>&lt;tal:call tal:define=&quot;data python:mytemplate.getValue()&quot;/&gt;<br>
...<br>...<br>...<br>...<br>&lt;tal:redir tal:condition=&quot;python:here.REQUEST.has_key(&#39;var&#39;)&quot;&gt;<br>&lt;tal:dummy tal:define=&quot;test python:here.REQUEST.RESPONSE.redirect(&#39;<a href="http://someotherurl">http://someotherurl</a>&quot;)&quot;/&gt;<br>
&lt;/tal:redir&gt;<br>...<br>...<br>...<br><br><br>What is happeninig is that the redirect in the PT is taking precedence over my redirect (which Im doing in the method). My question is: Can I make sure that my redirect takes precedence without modifying the PT itself. Is there any other ZopePageTemplate method which I can patch so that my own redirect kicks in first??<br>
<br>Thanks for you time and help.<br><br>-AK<br>