[Zope] String to object ID
Chris McDonough
chrism@digicool.com
Sat, 4 Dec 1999 18:23:19 -0500
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
Publishers of Zope http://www.zope.org
> -----Original Message-----
> From: Goodrichs [mailto:nbd95@macconnect.com]
> Sent: Saturday, December 04, 1999 6:06 PM
> To: zope@zope.org
> Subject: [Zope] String to object ID
>
>
> We have a short snippet of code that builds an image name
> from properties
> when a web page is called. We need to use this string to
> directly call the
> image object and display it in the page. For the life of me I
> cannot figure
> out how to coerce a string into an object id.
>
> Any hints?
>
> currently:
>
> <dtml-with "_.namespace(imagename='images.hd' + section)">
> <dtml -var imagename>
> </dtml-with>
>
> this correctly prints the name of the image object we want.
> 'images.hd.thisimage'
>
> How do I use that to display the image?
>
> 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 )
>