[Zope3-dev] Re: base tags and structured text rendering

Tonico Strasser contact_tonico at yahoo.de
Tue Nov 16 12:11:04 EST 2004


Craig Ewington wrote:
> I have a document 'index.html' that contains a single line of structured 
> text:
> 
> "a":a.html
> 
> to render the structured text, I have a page template that causes the 
> following lines of code to be invoked:
> 
> source = zapi.createObject(None, u'zope.source.stx', text)
> view = zapi.getView(removeAllProxies(source), '', self.request)
> return view.render()
> 
> 
> When rendered, the following html is produced:
> 
> <a href="a.html">
> 
> The browser interprets this as http://localhost:9080/index.html/a.html 
> instead of http://localhost:a.html. 

I belive, this happens only if the URL of the viewed page ends with a / 
(slash). If you want to add a <base> element you might also want to test 
how your pages will behave with fragment identifiers (a.html#framgmentid).

Tonico



More information about the Zope3-dev mailing list