[Zope] #include ...

Andrew Altepeter aaltepet at bethel.edu
Fri Jan 30 10:22:36 EST 2004


If you're using tal:contents, you need to tell TAL not to excape html
characters, like this:

<span tal:contents="structure here/some_other_content" />

HTH,
Andy

On Fri, 2004-01-30 at 09:09, Edward Comber wrote:
> Could you demo a simple macro to do it?
> 
> I did use the tal: method but I want to include further HTML code in a ZPT
> file. When I have this as a file of type 'text/html' it is included
> rendered, e.g.
> 
> <font face="Arial" size="2">
> 
> Appears in the browser literally as <font face="Arial" size="2">
> 
> and viewing the source shows
> 
> &lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;
> 
> When I make the file to be included of type 'text', it produces an XML
> compilation error.
> 
> Eddie.
> 
> -----Original Message-----
> From: Lennart Regebro [mailto:regebro at nuxeo.com]
> Sent: 30 January 2004 14:03
> To: Edward Comber; zope at zope.org
> Subject: Re: [Zope] #include ...
> 
> 
> From: "Edward Comber" <zope at comber.org>
> > but this is DTML and I'm trying to do it through ZPT.
> 
> That depends on what you want to include. To "include" more ZPT code you use
> macros. But to just include the rendering of something else, you use the
> tal:contents command.
> 
> > To include Zope files I thought I needed to know their extension but the
> > extension is not displayed in Zope and I can't find the files on disk - I
> > presume they are stored in the DB.
> > I came to the conclusion that you refer to them as objects simply by name.
> 
> Exactly.
> 
> 
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )




More information about the Zope mailing list