object id's and request vars
Hi, I need to include a fragment identified by a request var in a PT . This is something I tried. I believe there must be an easier way to achieve this. <SPAN tal:condition="exists:request/form/var" tal:repeat="x python:here.objectItems()"> <P tal:condition="python:x[0]==request.form['var']" tal:define="y python:x[1]" tal:replace="structure y"> </P> </SPAN> where the request is issued as <A tal:attributes="href python:here.id + '?var=test' "> inluded </A> Regards, Lieven -- Lieven Van Acker <lieven@elisa.be> ELiSA
Lieven Van Acker wrote at 2003-1-16 11:28 +0100:
Hi,
I need to include a fragment identified by a request var in a PT . This is something I tried. I believe there must be an easier way to achieve this.
<SPAN tal:condition="exists:request/form/var" tal:repeat="x python:here.objectItems()"> <P tal:condition="python:x[0]==request.form['var']" tal:define="y python:x[1]" tal:replace="structure y"> <p tal:define="var request/form/var" tal:replace="structure here/aq_explicit/?var" /> comes quite near.
The weak point is the "aq_explicit" which often (but not always) prevents acquisition. When you want to be safe, you need to search the collector for "hasattr_unacquired". Dieter
participants (2)
-
Dieter Maurer -
Lieven Van Acker