[Zope] Problem refering to a subfolder object
Kam Cheung
zope@littlecircle.com
Sun, 11 Jul 1999 03:32:37 -0400
A very newbie question:
How can I refer to a subfolder object? Basically, what I am trying to do is.
given a string, I want to detect whether an image with the same name as the
string exists or not in a subfolder, if it does, it display the object, if
not, it will show a default image. Here is what I have tried, but doesn't
work:
Let's say, a document has a string called "section" and the value of it is
"abc".
<!--#if name=images.global.[section]-->
<IMG SRC="images/global/<!--#var section-->">
<!--#else-->
<IMG SRC="images/global/default">
<!--#/if-->
That doesn't work. I did find a way to do it by doing:
<!--#with images-->
<!--#with global-->
<!--#if name=section-->
<IMG SRC="images/global/<!--#var section-->">
<!--#else-->
<IMG SRC="images/global/default">
<!--#/if-->
<!--#/with-->
<!--#/with-->
But I think there must be an easier way to do that.
Kam On Cheung