[Zope] ZCatalog: linking to directory not file in directory?

Andy Gimblett andy.gimblett@ftech.net
Wed, 11 Apr 2001 11:28:11 +0100


Hi there,

One of my colleagues has just come to me with a ZCatalog problem
which I don't know how to solve. Fundamentally, we want to be
able to catalogue the site so that for files with a certain name
("content_html"), the ZCatalog entries should link to the
directory containing the file, not the file itself.

Here's the situation:

* The site has just one "index_html" at the site root, which
  contains a <dtml-var content_html> tag.
* Every directory in the site contains a "content_html" DTML
  Method which contains that directory's desired contents.
* So, a call to http://site/foo/ involves acquiring index_html
  from the site root directory, and then inserting foo's
  content_html into that.

The problem is that when cataloging the site, we get lots of
links like /foo/content_html, /bar/content_html, etc., when
what we really want are /foo/, /bar/, etc., or maybe even
/foo/index_html, /bar/index_html - if you see what I mean. :-)

Unfortunately neither my colleague nor myself knows how to do this,
or even if it's possible.

Thanks in advance,

Andy
-- 
Andy Gimblett <andy.gimblett@ftech.net> Programmer 
Frontier Internet Services Limited <www.frontier-internet.ltd.uk> 
Tel: 029 20 820 044 Fax: 029 20 820 035 
Statements made are at all times subject to Frontier's Terms and
Conditions of Business, which are available upon request.