ZPT Print QueryString
Zope: I need to do something like: <a tal:attributes="href string:${here/absolute_url}/index_html?QUERYSTRING"> Refine Your Search </a> How can I get the QueryString above? Thanks, j.
Jason C. Leach wrote:
I need to do something like:
<a tal:attributes="href string:${here/absolute_url}/index_html?QUERYSTRING"> Refine Your Search </a>
How can I get the QueryString above?
The request object will provide this for you. To see what is available you can do:: <span tal:replace="structure here/request" /> I'm pretty sure it is actually named QUERY_STRING. Don't assume it's always there: I think it only shows up when there is one. --jcc -- "My point and period will be throughly wrought, Or well or ill, as this day's battle's fought."
hi: I have a ZPT that calles a 2nd ZPT to display more information on a document. In the parent ZPT I can do ${here/identifier} but in the child I can not: Error Type: KeyError Error Value: identifier What am I missing? Thanks, j.
Jason C. Leach wrote:
I have a ZPT that calles a 2nd ZPT to display more information on a document.
What does the code for thsi call look like? In the parent ZPT I can do ${here/identifier} but in the child
I can not:
Error Type: KeyError Error Value: identifier
What am I missing?
What happens if you do: <tal:x replace="here"/> ...in your 2nd ZPT? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Jason C. Leach wrote at 2004-2-24 09:00 -0800:
I have a ZPT that calles a 2nd ZPT to display more information on a document. In the parent ZPT I can do ${here/identifier} but in the child I can not:
Error Type: KeyError Error Value: identifier
What am I missing?
When you call a second ZPT (rather than include part of it via "metal:use-macro"), then "here" usually changes. "here" is the object via with the ZPT is accessed. -- Dieter
participants (4)
-
Chris Withers -
Dieter Maurer -
J. Cameron Cooper -
Jason C. Leach