[Setup] Form prior redirection

Denis Bitouzé dbitouze at wanadoo.fr
Thu Mar 17 09:19:25 UTC 2011


Le jeudi 17/03/11 à 09h29,
"Bastien Gauthier" <gbastien at commune.sambreville.be> a écrit :

> In fact, while doing
> metal:use-macro="here/main_template/macros/master", you will have
> some default value that come from the global_defines called in the
> main_template.  Well, to be short, doing this will give you some
> default value like "portal", "portal_url", "IsAnon", ...  You can see
> all these values in "Products/CMFPlone/browser/ploneview.py".  You do
> not need to "calculate" these values...

OK, thanks.

> In the template I proposed you, you could even do "portal_url"
> instead of "portal.absolute_url()" ...

Directly in the python part, like the following one?

<tal:redirect define="dummy python:
request.RESPONSE.redirect('portal_url/forms/my_join_form')" />

It seems to work, but leads to an odd URL:

http://<my_site>/portal_url/forms/my_join_form

This makes me realize that

<tal:redirect define="dummy python:
request.RESPONSE.redirect('/forms/my_join_form')" />

(without any 'portal URL') also works, leading to the expected:

http://<my_site>/forms/my_join_form

Cheers.
-- 
Denis


More information about the Setup mailing list