[Zope] String to object ID
Chris McDonough
chrism@digicool.com
Sun, 5 Dec 1999 00:51:21 -0500
Ah. Sorry. Misunderstood.
How about:
<dtml-with "images.hd">
<dtml-var "_.getitem(section, 1)">
</dtml-with>
How many strikes do I get before I'm out? :^)
Chris McDonough mailto:chrism@digicool.com
Digital Creations http://www.digicool.com
Publishers of Zope http://www.zope.org
> -----Original Message-----
> From: Goodrichs [mailto:nbd95@macconnect.com]
> Sent: Saturday, December 04, 1999 8:13 PM
> To: zope@zope.org
> Subject: RE: [Zope] String to object ID
>
>
> >One way might be to forego the use of the dtml-var tag to display the
> >image and just do:
> >
> ><dtml-with "_.namespace(imagename='images.hd' + section)">
> > <IMG SRC="<dtml-var imagename>">
> ></dtml-with>
> >
> >
> >Chris McDonough mailto:chrism@digicool.com
> >Digital Creations http://www.digicool.com
>
> That won't work because it only returns the string we created,
> 'images.hd.mysection' which is not a path.
>
> We are trying to create a method where we can dynamicly
> display an image
> based on the folder the page exists in. The images are named
> according to
> their location within the website;
>
> hd = top level
> section = sublevel
>
> ideally;
> top level
> images
> mysection
> would have an image of 'hdmysection'
> yoursection
> would have an image of 'hdyoursection'
>
> I want a tag I can put in any page and display the correct
> image without
> having to create a new unique property in all 2000 pages/ 200 folders.
>
> <dtml-var myimage>
>
> I can create to string that matches the id of the image
> 'images.hdmysection' but i cannot get Zope to go and fetch
> that object.
>
> Did I explain that properly?
>
> DAve.
>
>
>
> _______________________________________________
> 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 )
>