[Zope] addressing contained objects
hamish@allan.tc
hamish@allan.tc
8 Aug 2001 20:30:08 -0000
hello,
i'm new to zope and i've been playing around with DTML. i have been trying to
create a website with a menubar comprising several images, each a label for a
different subsection of the site. each subsection has a folder, and in each
folder there is an image similar to the menubar image for that section but with
a 'selected' appearance, like so:
root \
|->sub1_image (image for subsection 1, normal appearance)
|
|->sub2_image (image for subsection 2, normal appearance)
|
|->sub3_image (image for subsection 3, normal appearance)
|
|->sub1_folder \
| |->sub1_image (image for subsection 1, highlighted)
|
|->sub2_folder \
| |->sub2_image (image for subsection 2, highlighted)
|
|->sub3_folder \
|->sub3_image (image for subsection 3, highlighted)
there is common code in the root folder to display sub1_image, sub2_image and
sub3_image alongside each other; executing that code in the namespace of each
section folder gives that section its 'highlighted' appearance. this works
fine, but i'd like to put my images into an 'images' subfolder, both in the
root and within each section subfolder. but i can no longer address the images
using dtml-var - i want to be able to use something like <dtml-var
images/sub1_image> meaning "look in the current namespace for a container named
images with an object called sub1_image; if not found, look down the stack for
a container named images with an object called sub1_image, etc."
is this possible any other way? i have been well-advised by a friend of mine to
use transparent folders, but i thought i throw it open to the list to see if
there is any other way of doing something more akin to what i describe.
thanks in advance,
hamish
--
Get your firstname@lastname email for FREE at http://Nameplanet.com/?su