RE: Overriding work around
"Benno Luthiger" <[email protected]>
| Newsgroups | gmane.comp.web.zope.silva.devel |
|---|---|
| Message-ID | <000201c52e32$abcd7b20$1e238481@openlu> |
Dear Martijn > How is this called 'explicitly'? Browse to it directly like > foo/bar/index? Does it fail if you browse directly to a > non-index document? On my installation (Zope 2.7.4, Silva 1.2) if done the following: In the silva root I've created a page template 'override.html'. Now when I request 'http://localhost:port/silva/' I see the override template displayed. Now when I request 'http://localhost:port/silva/index', the content of the index document is rendered in the traditional Silva layout. If I add another Silva document 'anotherDoc' in the Silva root container and request it with 'http://localhost:port/silva/anotherDoc', this new content again is displayed in the Silva layout and not with the override template. > If it is indeed not working for > index documents but it does work for other documents, something quite > peculiar looks to be going on that we need to investigate further. I would say the behaviour is consistent: All documents are displayed not overriden. Only the container that implicitely takes the default content is rendered using override.html. Regards, Benno > -----Original Message----- > From: Martijn Faassen [mailto:[email protected]] > Sent: Montag, 21. März 2005 17:01 > To: Luthiger Stoll, Benno > Cc: silva-dev-IAPFreCvJWM6s/[email protected] > Subject: Re: [silva-dev] Overriding work around > > > Benno Luthiger wrote: > > Dear Silva developers, > > > > With silva/index_html Silva offers the opportunity to > override the standard > > layout with a local layout. This is a nice feature and > useful for some > > abvious website designs. The override mechanisme works fine > if the container > > (e.g. Silva Folder or Publication) containing the override > template is > > called. However, it fails if the container's default > document 'index' is > > called explicitely. > > How is this called 'explicitly'? Browse to it directly like > foo/bar/index? Does it fail if you browse directly to a > non-index document? > > > And of course it fails in our situation where we > > implemented multilingual support by simply postfixing the > language key to > > the document. Instead of displaying the content of > 'mysite/index_DE' in the > > override layout, the content is rendered with the default layout. > > To overcome this problem I've modefied the Script > 'index_html' slightly by > > checking the context.id and installed this modified version > somewhere beyond > > the Silva Root: > > [snip] > > > Do you see a draw back with this work around? > > I think first we'll need to find out what the root cause is > of override > not being called for index documents. If it is indeed not working for > index documents but it does work for other documents, something quite > peculiar looks to be going on that we need to investigate further. > > Regards, > > Martijn >