[Zope] How to find out whether index_html was acquired?

hamish@allan.tc hamish@allan.tc
16 Aug 2001 04:06:32 -0000


On Wed, 15 Aug 2001 16:45:40, "Hamish Lawson" <hamish_lawson@yahoo.co.uk> wrote:

> I'm wondering whether there is a way to determine whether the 
> index_html method was found in the current folder or was acquired 
> from a folder above.

one way of doing this is to create a python script base_url like this:

  return container.absolute_url()

placing it in the base folder, and an index_html like this:

  <dtml-if expr="base_url() == absolute_url()">
   <dtml-var index_self_html>
  <dtml-else>
   <dtml-var index_sub_html>
  </dtml-if>

may you find the base_url script useful in many other ways too!

cheers,
hamish


-- 
Get your firstname@lastname email for FREE at http://Nameplanet.com/?su