[Zope] Open the "index.htm" file in a folder

Lennart Regebro lennart@regebro.nu
Sat, 26 Jan 2002 11:04:17 +0100


Well, first we need to get the terminology right. :-)
A "File" in Zope is either a file residing on your harddrive, or the File
object you can create in the database.
In this case you are creating html objects. You want to use the objects
called DTML Method. You could use the ones called DTML Docuemnt too, but you
will sooner or later get in trouble doing that, in my opinion.
So put your HTML code in to the objects called DTML File.

Secondly, the default object in Zope is called index_html. If you rename all
your HTML objects this it should work.

Thirdly, the reason is now fetches your top index_html document when it
can't find one in the folder you are in is a magic and wonderful thing
called aqcuisition, and can be used to make it much easier to make sites in
Zope. What you can do is to only have one index_html, namely the one in the
root. In this index_html you then have the design of your site. You also do
a <dtml-var Content> where you want the content of the page to be.
After that, you then put one DTML Method called Content in each folder. This
way each of your folder becomes one finished document including design and
everything.

Then we come to the fun part: Automatic navigation. But thats another thing
altogether.
Read the zope book. Its big, but good.

----- Original Message -----
From: "Allen May" <allen.may@mcsinet.com>
To: "Zope (E-mail)" <zope@zope.org>
Sent: Friday, January 25, 2002 10:43 PM
Subject: [Zope] Open the "index.htm" file in a folder


> I am trying to setup navigation on my site.
> I want to open a default page when you go into a subfolder (like a default
> or index.htm).
> When I try this, it just shows the DocRoot file.
>
> Example:
>
> root
> index.htm
>    |
>    |
>    |-------------
>    |            |
>    |          SubFolder1
>    |          index.htm
>    |
>    |
>    |-------------
>                 |
>               SubFolder2
>               index.htm
>                 |-------------
>                              |
>                            SubSubFolder1
>                            index.htm
>
> When I go to SubFolder1 or SubSubFolder1 I go back to the root index.htm.
>
> Why is it doing this rather than opening the index.htm?
>
> Thanks
>
> -Allen
>