[Zope-CMF] Insert path into a query URL?

Dieter Maurer dieter@handshake.de
Thu, 13 Jun 2002 20:58:05 +0200


Jon Edwards writes:
 > ...
 > I can work out the path by defining a variable, something like -
 > 
 >    define = local_path python: '/'.join(here.getPhysicalPath())
 > 
 > - in the page header, but is it possible to insert this in the URL query?
Sure:

	tal:define="
	  std	modules/Products/PythonScripts/standard;
	  qp	nocall:std/url_quote_plus;
	  upath	python:qp(local_path);
	  "

Now, "upath" contains "local_path" in a form that can be used as part
of a query string:

        tal:attributes="
	  href  string:...&path=${upath}...;
	  "


Dieter