[Zope3-dev] base tags and structured text rendering
Craig Ewington
ewington at adelphia.net
Tue Nov 16 09:54:03 EST 2004
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. This seems to be related to the
absence of a <base...> tag in the generated document. Should I
a) Insert a base tag in my skin's template file e.g. <base
tal:attributes="href context/@@absolute_url />
b) Patch the structured text classes to take a base url and generate
absolute references instead of relative ones
c) Something else..?
Thanks for your help.
- Craig Ewington
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1371 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20041116/8d49ceb4/attachment.bin
More information about the Zope3-dev
mailing list