[Zope] dtml-var probleman

Maik Jablonski maik.jablonski@uni-bielefeld.de
09 Jun 2002 20:32:30 +0200


On Sun, 2002-06-09 at 15:24, Daniel Schmitz wrote:
> Ok, lets go:
> 
> i have:
> 
> root
> |
> |- index_html
> |
> \[contents]
>      |
>      |- myhistroy
> 
> In myhistory, i have the code:
> 
> <H1>This is my History<H1>
> <P>This is..............</P>
> 
> 
> and my index_html:
> 
> <dtml-var "contents.myhistory">
> 
> 
> but the output is:
> 
> <H1>This is my History<H1>
> .....
> 
> 
> and i need the output formated in html!!
> 
> 
> ps.: Dear Bak @ kedai, i use contents.myhistory() but
> don't works...
> 
> Thanks,
> Daniel Schmitz 

Now I've got it...

several ways... most clear approach:

<dtml-with contents>
 <dtml-var myhistory>
</dtml-with>

if you don't need a special client-object:

<dtml-var "contents.myhistory(None,_)">

or if you need contents as your client-object [the object, myhistory is
called on]:

<dtml-var "contents.myhistory(contents,_)">

greetings, maik