[Zope] Links to Images and Other Pages

Charlie Reiman creiman@kefta.com
Wed, 14 Aug 2002 12:51:49 -0700


On the assumption that you're a newbie, keep in mind images with '.' in the
name will require special treatment:

<dtml-var "images['myimage.gif'].absolute_url()">

And you may want to use the 'tag' method for special tricks:

<dtml-var "images['myimage.gif'].tag(width=200, height=11)">

This will generate a full <IMG src...> element rather than just the URL. I
suggest you play around and read the source.

Happy hunting.

Charlie.

> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Chris
> McDonough
> Sent: Wednesday, August 14, 2002 12:14 PM
> To: Kevin Sullivan; eric@walstads.net; zope@zope.org
> Subject: Re: [Zope] Links to Images and Other Pages
>
>
> <dtml-var "images.someimagename.absolute_url()"> should work if your
> images are in an image folder.
>
> ----- Original Message -----
> From: "Kevin Sullivan" <ksull@economics.mit.edu>
> To: <eric@walstads.net>; <zope@zope.org>
> Sent: Wednesday, August 14, 2002 3:08 PM
> Subject: RE: [Zope] Links to Images and Other Pages
>
>
> > Well, the image is one problem and the faculty link is another,
> sorry
> > for the confusion.
> >
> > I have my images in an "image" dir which makes acquisition
> difficulty.
> >
> > Faculty is a second level folder in my site. I believe the
> > absolute_url() idea will work for those folders though.
> >
> > Thanks
> >
> > -----Original Message-----
> > From: Eric Walstad [mailto:eric@walstads.net]
> > Sent: Wednesday, August 14, 2002 3:00 PM
> > To: zope@zope.org
> > Cc: Kevin Sullivan
> > Subject: Re: [Zope] Links to Images and Other Pages
> >
> > Hi Kevin,
> > Have a look at absolute_url() in the docs.
> > Assuming "faculty" is your image, something like:
> > <dtml-var "faculty.absolute_url()"> or
> > <img tal:attributes="src context/faculty/absolute_url">
> > might do the trick.
> > Best,
> > Eric.
> > Kevin Sullivan wrote:
> > > Hi,
> > >
> > > A general zope question: Whats the best way to refer to images
> > > and other links within a zope site? I am now using apache proxy
> in
> > front
> > > of ZServer. Basically im trying to avoid
> > > Links like "/intranet/faculty/faculty/faculty"
> > >
> > > Thanks in advance,
> > > Kevin
> >
> >
> >
> >
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> >
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>