how to test to find image
I'm email this list again since several were nice enough to respond last time. I new and this list is helpful. I'm in Plone and want to display an image at the top of a UI box (like to top of the related or navigation box). However this image needs to change depending on what subfolder/branch I'm at. Normally I have seen the use of the tag "here/myimage.gif". My understanding is the default is to start at the top most directory and work its way through the site until it finds the first occurance of myimage.gif. I would like to reverse this behavior. I need it to start looking in the current location and work upwards until it finds myimage.gif. The reason is that under each of my first level subfolders I have placed a myimage.gif file. Even if I'm maybe four folders down I want to display that myimage.gif from the current branch (which my be three folders up). However if the normal logic of 'here' works it will find the wrong myimage.gif. <div class="box"> <img tal:replace="structure here/myimage.gif" /> <other tags and things .....> </div> Thanks, Steven
On Tue, Mar 04, 2003 at 01:18:03AM -0500, Steven Smith wrote:
the use of the tag "here/myimage.gif". My understanding is the default is to start at the top most directory and work its way through the site until it finds the first occurance of myimage.gif. I would like to reverse this behavior. I need it to start looking in the current location and work upwards until it finds myimage.gif.
either your understanding is wrong, or you're using "upwards" to mean the reverse of what it means to me. A/ - myimage.gif - B/ - C/ - myimage.gif - mypage If mypage is a zpt that contains <img tal:replace="structure here/myimage.gif" /> , then when you view A/C/mypage, the image will be A/C/myimage.gif.
The reason is that under each of my first level subfolders I have placed a myimage.gif file. Even if I'm maybe four folders down I want to display that myimage.gif from the current branch (which my be three folders up). However if the normal logic of 'here' works it will find the wrong myimage.gif.
have you actually tried it? :) -- Paul Winkler http://www.slinkp.com
At 10:18 PM 3/3/2003, Steven Smith wrote:
My understanding is the default is to start at the top most directory and work its way through the site until it finds the first occurance of myimage.gif. I would like to reverse this behavior. I need it to start looking in the current location and work upwards until it finds myimage.gif.
Well... you're in luck, because the reverse of what you described is how it actually works. This would be a great time to read up on Acquisition, which is a key part of how Zope resolves requests for images and other objects. http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/Acquisition.stx http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html#c37ac15c13 http://www.zope.org/Documentation/Books/ZDG/current/Acquisition.stx HTH, Dylan
participants (3)
-
Dylan Reinhardt -
Paul Winkler -
Steven Smith