[Zope] Acquisition - I don't get it

Jan Bruvoll jan at bruvoll.com
Mon Jan 31 09:40:43 EST 2005


Hi there,

I've been struggling with something that must be very basic, but I just 
don't get it. Hopefully, there's somebody out there who could enlighten 
me a little...

I have this site hierarchy, something like this:

/top
/top/section1/
/top/section1/chapter1
/top/section1/chapter1/paragraph1
/top/section1/chapter1/paragraph2
/top/section1/chapter2
/top/section1/chapter2/paragraph1
/top/section2/
/top/section2/chapter1
/top/section2/chapter1/paragraph1

etc.

These are all folders with an index_html inside them. The template will 
have, among other things, a site title image, a section title image, and 
a page title image for each page.

The idea here is to be able to create a folder img/ at appropriate 
levels of this hierarchy and use images section_title.gif, 
chapter_title.gif, page_title.gif, etc. This might be where I've 
misunderstood everything, but I was hoping to do something like this:

<img src="dummy.gif" class="title-img" tal:define="image 
here/img/section_title.gif" tal:attributes="src image/absolute_url" />

If for instance looking at one of the paragraph pages, the template 
would then, in my perfect world, start looking for an "img/" folder at 
the current level, and within it a file named "section_title.gif", and 
if it does not find it, it will try again one level up in the hierarchy, 
until it then finds the section_title.gif in the folder 
/top/section1/img/section_title.gif. Same goes for the other images, but 
they would "hit" further down in the hierarchy so that I could 
effectively let a "closer" image override one with the same name, but 
further up.

Have I got it completely wrong? Is my thinking right, but my syntax 
wrong? Haven't been able to get anywhere on this - all documentation I 
can find gives hints and pointers, but I'm still stuck...

Any help & comments highly appreciated!

Best regards
Jan



More information about the Zope mailing list