[ZPT] Re: How to pass parameters to a ZPT call inside another ZPT

Evan Simpson evan at 4-am.com
Fri Aug 29 14:18:26 EDT 2003


Sinclair wrote:
> I don't understand how to pass parameters to a ZPT call inside another ZPT,
> and then to catch those parameters in the second.
> 
> Maybe should I use 'options' builtin name ?

For most cases, METAL is the way to combine templates.  If you really 
need to make an explicit call, you can do it like this:

### TEMPLATE ONE SNIPPET ###
<div tal:replace="structure python:here.template2(color='red')">

### TEMPLATE TWO SNIPPET ###
My favorite color is <span tal:replace="options/color">plaid</span>.

Cheers,

Evan @ 4-a,m





More information about the ZPT mailing list