HTML Document rendering?
Hi all, I do not want to access HTML documents directly via URL, I want to render these documents via dtml-var method. So few HTML documents will be rendered into one page with omit all other than BODY container. I has DTML pages what are rendered into one page with that method (this is OK for DTML Document only): <dtml-in expr="objectValues('DTML Document')" sort=id> <dtml-if "hasProperty('hide')"><dtml-else> <dtml-if "hasProperty('html')"> <dtml-elif expr="_.string.find(_['id'],'.htm')>0"> <dtml-var sequence-item> <dtml-else> <dtml-var sequence-item fmt=structured-text> </dtml-if> </dtml-if> </dtml-in> This is fully functional with HTML segments (content between <body>&</body> tags only) uploaded via FTP and saved as DTML Document. But I want to upload whole HTML documents. So I install HTML document product and change dtml-in: <dtml-in expr="objectValues('DTML Document', 'HTML Document')" sort=id> then browse page, and I have receive error (see attachment) navi_CHILD DTML method mentioned in error report is: <dtml-in "PARENTS[0].objectValues('Folder')" sort=poradi> <a href="<dtml-var absolute_url>/" class="navlchild"> <dtml-var title_or_id></a><br> </dtml-in>
Jaroslav Lukesh writes:
...
<dtml-in "PARENTS[0].objectValues('Folder')" sort=poradi> <a href="<dtml-var absolute_url>/" class="navlchild"> <dtml-var title_or_id></a><br> </dtml-in> ... Error Type: NameError Error Value: global name 'PARENTS' is not defined Looks like you call the DTML object without its positional arguments? Maybe, you should read "Calling DTML objects" in
<http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> Dieter
participants (2)
-
Dieter Maurer -
Jaroslav Lukesh