[ZPT] Adding to namespace stack in ZPT

Evan Simpson evan@4-am.com
Mon, 24 Jun 2002 11:13:02 -0500


Dylan Jay wrote:
> Given what I said above the problem is how to get the ns from within ZPT and
> how to add to it? eg
> 
> <span tal:define="row here/qryA">
>   <span tal:content="python:here.showRow(here, ns+row, request)"></span>
> </span>
> 
> In other words how can I call a DTMLMethod from within a ZPT while still
> retaining control of the namespace pased in?
> or another way to solve my problem would be something like this

Hmm.  TAL doesn't allow direct manipulation of its variable stack.  The 
best I can suggest (and it's not very good) is a DTML wrapper:

<span tal:define="add_to_stack here/qryA;
                   thing_to_call notcall:here/showRow">
   <span tal:content="here/PushStackCall"></span>
</span>


<dtml-with add_to_stack><dtml-call expr="_[thing_to_call]"></dtml-with>

Sorry,

Evan @ 4-am