Is there a list of file names which Zope looks for to automatically display a homepage when a website is referenced? I would like home.htm to shown when viewing www.mysite.org but it doesn't look as if Zope searches for such a file. Is this a configuration option? -- John
--On Montag, 4. Oktober 2004 12:28 Uhr +0100 John Poltorak <jp@warpix.org> wrote:
Is there a list of file names which Zope looks for to automatically display a homepage when a website is referenced?
I would like home.htm to shown when viewing www.mysite.org but it doesn't look as if Zope searches for such a file. Is this a configuration option?
The default view is always 'index_html'. -aj
On Mon, Oct 04, 2004 at 01:35:12PM +0200, Andreas Jung wrote:
--On Montag, 4. Oktober 2004 12:28 Uhr +0100 John Poltorak <jp@warpix.org> wrote:
Is there a list of file names which Zope looks for to automatically display a homepage when a website is referenced?
I would like home.htm to shown when viewing www.mysite.org but it doesn't look as if Zope searches for such a file. Is this a configuration option?
The default view is always 'index_html'.
Is there any way to overide this or create an index_html which simply autoloads home.htm?
-aj
-- John
--On Montag, 4. Oktober 2004 12:44 Uhr +0100 John Poltorak <jp@warpix.org> wrote:
On Mon, Oct 04, 2004 at 01:35:12PM +0200, Andreas Jung wrote:
--On Montag, 4. Oktober 2004 12:28 Uhr +0100 John Poltorak <jp@warpix.org> wrote:
Is there a list of file names which Zope looks for to automatically display a homepage when a website is referenced?
I would like home.htm to shown when viewing www.mysite.org but it doesn't look as if Zope searches for such a file. Is this a configuration option?
The default view is always 'index_html'.
Is there any way to overide this or create an index_html which simply autoloads home.htm?
index_html (as DTML method): <dtml-call "REQUEST.RESPONSE.redirect(this().absolute_url() + '/home.html')" > or just <dtml-call "REQUEST.RESPONSE.redirect('/home.html')" > -aj
hi, On Mon, 2004-10-04 at 13:47, Andreas Jung wrote:
--On Montag, 4. Oktober 2004 12:44 Uhr +0100 John Poltorak <jp@warpix.org> wrote:
On Mon, Oct 04, 2004 at 01:35:12PM +0200, Andreas Jung wrote:
--On Montag, 4. Oktober 2004 12:28 Uhr +0100 John Poltorak <jp@warpix.org> wrote:
Is there a list of file names which Zope looks for to automatically display a homepage when a website is referenced?
I would like home.htm to shown when viewing www.mysite.org but it doesn't look as if Zope searches for such a file. Is this a configuration option?
The default view is always 'index_html'.
Is there any way to overide this or create an index_html which simply autoloads home.htm?
index_html (as DTML method):
<dtml-call "REQUEST.RESPONSE.redirect(this().absolute_url() + '/home.html')" >
or just
<dtml-call "REQUEST.RESPONSE.redirect('/home.html')" >
Hrhm. Would a simple python script consisting of: return context['home.htm']() look a bit cleaner? ;) Sure, it depends a bit on the type of home.htm... Regards Tino
On Mon, 4 Oct 2004 12:44:09 +0100, John Poltorak <jp@warpix.org> wrote:
On Mon, Oct 04, 2004 at 01:35:12PM +0200, Andreas Jung wrote:
The default view is always 'index_html'.
Is there any way to overide this or create an index_html which simply autoloads home.htm?
It's possible to use an index_html that returns the content of home.htm. For example, using a DTML method with the following content: <dtml-var home.htm> -- Roberto Lupi
Hi John, On Mon, 2004-10-04 at 13:28, John Poltorak wrote:
Is there a list of file names which Zope looks for to automatically display a homepage when a website is referenced?
I would like home.htm to shown when viewing www.mysite.org but it doesn't look as if Zope searches for such a file. Is this a configuration option?
Here is the list: ['index_html'] Yes, its only one element. Strictly speaking there are no such things like files in Zope. You have a bounch of objects forming attributes and methods of a big object-tree. Pointing a browser (via URL) to somewhere in the tree is means zope walks up from root to the desired object and calls it. Whatever this call returns is then sent to the browser. (This simple explanation does not cover advanced topics as Acquisition) Maybe you want to follow the examples in the Zope-Book a bit to find out. You can make a simple python script to look at the attributes of the current folder if there are any of your "default" documents and return them rendered. Best results are however if you redesign your site specific to Zope. Regards Tino
On Mon, 4 Oct 2004 12:28:52 +0100, John Poltorak <jp@warpix.org> wrote:
Is there a list of file names which Zope looks for to automatically display a homepage when a website is referenced?
['index_html']
I would like home.htm to shown when viewing www.mysite.org but it doesn't look as if Zope searches for such a file. Is this a configuration option?
rename home.htm to index_html There used to be an article "There is only one index_html" on zope.org ... but that's using DTML, not ZPT. -- --- The Count
On Mon, Oct 04, 2004 at 01:43:01PM +0200, The Count wrote:
On Mon, 4 Oct 2004 12:28:52 +0100, John Poltorak <jp@warpix.org> wrote:
Is there a list of file names which Zope looks for to automatically display a homepage when a website is referenced?
['index_html']
I would like home.htm to shown when viewing www.mysite.org but it doesn't look as if Zope searches for such a file. Is this a configuration option?
rename home.htm to index_html
I'm hosting a website which has numerous references to home.htm and I'd prefer not to change those references if possible. I guess I could copy it if there is no other alternative.
-- --- The Count
-- John
hi, On Mon, 2004-10-04 at 13:47, John Poltorak wrote: ...
I'm hosting a website which has numerous references to home.htm and I'd prefer not to change those references if possible. I guess I could copy it if there is no other alternative.
Well, its alwasy not best style to use default documents explicit in links. This is often a result of doing the HTML in a filesystem and then uploading it unchanged to some server. Most authoring systems support rewrite of URLs on publishing. It looks cleaner (and works better in most situations) if you refer to the folder/home.htm or folder/index.htm or whatever just via folder/ (But dont omit the slash!) Regards Tino
participants (5)
-
Andreas Jung -
John Poltorak -
Roberto Lupi -
The Count -
Tino Wildenhain