[Zope-PTK] images folder

Tres Seaver tseaver@digicool.com
Tue, 20 Mar 2001 10:15:14 -0500 (EST)


On Tue, 20 Mar 2001, Norman Khine wrote:

> Thats better, I can now see the zope logo, but am still confused.
> 
> If a Member has a dtml file,

Documents / NewsItems  are *not* DTML objects;  they are content.
The CMF explicitly disables the interpretation of DTML which is
embedded in them.

> ie news item can he create a folder called
> images and put all image files in this folder and then point to it as <h2>
> <img src="/images/embedded_image" alt="Embedded image">
>      How-to: Embedding Images in Documents </h2>
> 
> or does he have to specify the full path?

The rules for paths are the same rules as would apply in a Zope
DTML method:  leading slash specifies a site-relative path (i.e.,
to the root of the Zope, or the virtual host root); paths without
leading slashes are relative to the current object.

If the 'images' folder is in the same folder as the document,
then the link would be (note no leading slash):

 <img src="images/embedded_image" alt="Embedded image">

If the 'images' folder is hanging off of the portal object, then
the link would be:

 <img src="&dtml-portal_url;/images/embedded_image" alt="Embedded image">

Side note:

    Please CC the mailing list (zope-ptk@zope.org) in your
    replies; this conversation will benefit from community
    participation.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org