Stephan Richter wrote:

> Hello everyone,
> I want to make my own name space with the following situation:
> class X:
>    attributes = {'foo': 'bar'}
> x = X()
> Then I want to use it like that:
> <dtml-with x>
>      <dtml-var foo>
> </dtml-with>

> The result should be : bar

If you use

   <dtml-with x mapping>
     <dtml-var foo>

You will get the result you want.

For the other stuff, look in DocumentTemplate/ The 
python code is pretty clear, although the C version is what is normally 
used in Zope.

Otherwise, see DocumentTemplate/ and, or see how it 
is done in ZPatterns in

By the way, I notice you posted this to [EMAIL PROTECTED] and 
[EMAIL PROTECTED] If you look in the standard footer of each email from 
both lists, you'll see this:

   **  No cross posts or HTML encoding!  **

Steve Alexander
Software Engineer
Cat-Box limited

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to