[Zope] index.html and symlinks

Danny William Adair danny@adair.net
Thu, 25 Oct 2001 12:12:46 +1300


Simple but imho very elegant:
create a dtml-METHOD "index_html" holding this one-liner:

<dtml-var index.html>

Every call inside the folder that holds this "index_html" will return the 
appropriate "index.html", no matter what subdirectory you're accessing.

hth,
Danny

On Thursday 25 October 2001 11:40, marc lindahl wrote:
> > From: Markus Schaber <markus.schaber@student.uni-ulm.de>
> > Date: Thu, 25 Oct 2001 00:35:41 +0200
> > To: "marc lindahl" <marc@bowery.com>
> > Subject: Re: [Zope] index.html and symlinks
> >
> > Hello,
> >
> > On Wed, 24 Oct 2001 16:19:55 -0400, "marc lindahl" <marc@bowery.com>
> >
> > wrote:
> >>> I have two questions:
> >>> First, is there any possibility to use the name "index.html" instead
> >>> of"index_html" as default name for the directory indes? I ask this
> >>> because we want to transform a web project into zope, and we don't
> >>> want to change the URLs.
> >>
> >> Check out load_site.py, it's part of the release.  It does that for
> >> you.
> >
> > Thanks for the interesting pointer. We won't be able to use it directly
> > (as we have a rather wicked layout so we have to snip out the content
> > manually), but it's a good help!
>
> load_site.py isn't actually too hard to modify (I did some mods to it,
> http://www.zope.org/Members/bowerymarc) so maybe you could automate the
> process with that....
>
> > (if you want to take a look at the original site, look at
> > http://www.gemeinsamlernen.de/ [german only] and
> > http://www.gemeinsamlernen.de/europa/solill/ [multilingual] - all managed
> > manually by copy and paste up to now :-)
> >
> >>> Second, is there some kind of "symlink", that means making one page
> >>> accessible at another path using another name?
> >>
> >> You can make a DTML method that does a dtml-raise redirect (that's how
> >> load_site does it)
> >
> > I'll try this. I guess that one "index.html" sitting in the root should
> > be enough because of aquisition.
>
> Yes, that's right.   You could also do a default.html, index.htm -- some
> serach engines like to see those types of things.
>
> > markus
> > --
> > You don't have to be Microsoft to suck... but it helps.
> > (Tim Hammerquist in comp.lang.python)
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )