[ZPT] URL query string variables to call a macro or template
KJ Moffatt, Careers Advisory Service
Keir.Moffatt at bristol.ac.uk
Thu Sep 16 05:44:26 EDT 2004
Thank you very much. My final code was:
<div tal:define="guidedir request/name; guidename
python:string(request.name + request.pages)">
Guide Directory: <span tal:replace="string: $guidedir">dir</span>.
Guide Name: <span tal:replace="string: $guidename">name</span>.
<div
metal:use-macro="here/?guidedir/?guidename/macros/?guidename">footer</div>
</div>
Although I do need to put in some error checking to prevent page crashes.
In this instance the URL would appear as ?name=test&page=1
Many thanks,
Keir
--On 15 September 2004 21:22 +0200 Dieter Maurer <dieter at handshake.de>
wrote:
> KJ Moffatt, Careers Advisory Service wrote at 2004-9-15 14:51 +0100:
>> I want to use the url query string variables (e.g.
>> index_html?id=book1&page=19) to call a macro or template.
>> ...
>> <div metal:use-macro="here/$incfile/macros/$incname">footer</div>
>
> Try:
>
> ... use-macro="here/?incfile/macros/?incname"...
>
> --
> Dieter
_______________________________________________
Keir Moffatt, Information Systems Officer
Careers Advisory Service, University of Bristol
11 Priory Road, Clifton, Bristol, BS8 1TU
Tel: +44 (0)117-928-8224
Fax: +44 (0)117-954-6818
Email: Keir.Moffatt at bristol.ac.uk
Web: http://www.bris.ac.uk/cas
_______________________________________________
More information about the ZPT
mailing list