DirectoryResource

Nick Pollitt writes:
 > I have a directory 'dir' that's in /WWW/dir and I want to keep
 > Jigsaw from looking for any indexs (index.html Overview, etc).
 > 'dir' also has several sub-dirs.
 > 
 > I tried using the /Admin/Directories resource to get the 
 > behavior I wanted, but Jigsaw is still looking for index.html
 > (the default on WWW).
 > 
 > I know I can go through the Editor one directory at a time,
 > but this would require quite a bit of time, and it seems that
 > the directory templates should handle this.

Let me take that opportunity to try to clear up some common
mmisunderstandings about the directory templates.

Directory templates are supposed to be templates for directory to be
indexed in the futur: this means that once a directory resource has
been created through one of the templates, changing the template
itself will not change the directory resource that have been created
out of it in the past (same is true for FileResource and extensions).

Now, a directory template is something that tells the resource indexer
how to index a directory from the file system. Once the path of the
directory to index is known, the resource factory loooks for a
matching template in the following manner:

If the *physical* (not it's url) directory /a/b/c/d is to be indexed:

- First, look for a directory template named "d". If such a template
is found, clone it to index the directory.
- Then look (backward) for a template named c, b or a. If any such
template is found, check it's generic attribute value, if false,
ignore that template, otherwise  clone it to index the directory.

This means that if you want all the directories to have an index.html
you can create a WWW template (since every exported file is under the
WWW directory in the sample config), mark it generic, and edit the
template to set its index to index.html.

If for some reasons, you have a WWW/Foo directory, and you don't want
that to be index.html'ed you can define a new generic template (so
that it applies to everything below Foo), without a defined index
attribute. 

Hope this helps a little ,
Anselm.

Received on Friday, 18 October 1996 09:03:15 UTC