[Zope] Bag 'o newbie questions
Mike Renfro
renfro@tntech.edu
Fri, 9 Aug 2002 23:03:31 -0500
On Fri, Aug 09, 2002 at 02:40:16PM -0700, Michael S. Fischer wrote:
> 2) I wrote a left-side navbar that displays the directory tree of the
> site. Lucky me! <dtml-tree> seems to be capable of generating an even
> nicer one. Our site's directory tree looks like this:
I got tree to work a long time ago, but I actually got tired of the
perpetual clickability of it. I exchanged it for an NFGNav-based
navbar, and then for one written in Python and ZPT. Documented at
http://www.zope.org/Members/mwr
> 3) In directories like /d/dd, where there is no index_html page, I do
> _not_ want to inherit a parent's index_html page; rather, I want to set
> up my own TOC generator for the directory. What's the best way to do
> this?
Untested code, assuming any designers you have don't mind editing
pages not named index_html:
index_html (acquired from root):
<dtml-if "_.hasattr(this().aq_explicit, 'content_html')">
<dtml-var content_html>
<dtml-else>
<dtml-var toc_html>
</dtml-if>
Use content_html like you'd normally use index_html; use the dtml
method toc_html to generate your toc.
--
Mike Renfro / R&D Engineer, Center for Manufacturing Research,
931 372-3601 / Tennessee Technological University -- renfro@tntech.edu