Re: [Zope] Why doesn't this work?
webman wrote:
i removed the bluedot and image tags and this thing wouldn't work for me. i called it via a seperate document. does this DTML method have to be in the root folder?
No, at least not in my environment, but because of the line below, there must be at least 2 documents in the folder. Which also means you can include it in a template and not have it displaying if it's not apprpriate. Hope this helps. if not, send me what you have and I'll see if I can see anything. I'm not at all an expert, tho.. - Craig
<!--#if "_.len(objectIds(['DTML Document'])) > 1"-->
hello craig,
No, at least not in my environment, but because of the line below, there must be at least 2 documents in the folder. Which also means you can include it in a template and not have it displaying if it's not apprpriate.
Hope this helps. if not, send me what you have and I'll see if I can see anything. I'm not at all an expert, tho.. - Craig
<!--#if "_.len(objectIds(['DTML Document'])) > 1"-->
here is the traceback i get: Traceback (innermost last): File /usr/local/Zope-1.10.2-src/lib/python/ZPublisher/Publish.py, line 877, in publish_module File /usr/local/Zope-1.10.2-src/lib/python/ZPublisher/Publish.py, line 590, in publish (Info: /Test/Cool/funktionblah) File /usr/local/Zope-1.10.2-src/lib/python/OFS/DTMLDocument.py, line 212, in __call__ (Object: funktionblah) File /usr/local/Zope-1.10.2-src/lib/python/OFS/DTMLDocument.py, line 208, in __call__ (Object: funktionblah) File /usr/local/Zope-1.10.2-src/lib/python/DocumentTemplate/DT_String.py, line 513, in __call__ (Object: funktionblah) File /usr/lib/python1.5/DT_With.py, line 138, in render (Object: _.namespace(thisdoc=id())) File /usr/lib/python1.5/DT_With.py, line 138, in render (Object: PARENTS[0]) File /usr/lib/python1.5/DT_In.py, line 635, in renderwob (Object: objectValues(['DTML Document'])) File /usr/lib/python1.5/DT_In.py, line 704, in sort_sequence (Object: objectValues(['DTML Document'])) AttributeError: (see above) .... regards, webman --------------------------------------------------------------------------- webman | _ beehive GmbH | ASCII ribbon campaign ( ) berlin, Germany | - against HTML email X http://www.beehive.de | & vcards / \
webman wrote:
File /usr/lib/python1.5/DT_In.py, line 704, in sort_sequence (Object: objectValues(['DTML Document']))
I'm embarassed, bad explanation on my part. I have an integer property on each document that I set to control the sequence in the list. The property is called 'order' (not a very good name) and is referenced here in the original code:
<!--#in expr="objectValues(['DTML Document'])" sort=order-->
Try
<!--#in expr="objectValues(['DTML Document'])"-->
and see how it works. Regards, - Craig -- Craig Allen - Managing Partner - Mutual Alchemy Information Architecture - http://alchemy.nu
hey craig, it works now, thanks. tried to do something similar to your DTML in the past by fooling around with the sidebar tree tag example the code below is far from elegant considering you have to let the script now where its being called example: /Zope/Test/Cool/ = PARENTS[-3] in my tests it only shows files with titles (which is what i wanted it to do). <!--#tree expr="PARENTS[-3]" branches_expr="objectValues()" --> <A HREF="<!--#var absolute_url-->"><!--#var title--></A> <!--#/tree--> cheers, webman --------------------------------------------------------------------------- webman | _ beehive GmbH | ASCII ribbon campaign ( ) berlin, Germany | - against HTML email X http://www.beehive.de | & vcards / \ On Mon, 10 May 1999, Craig Allen wrote:
webman wrote:
File /usr/lib/python1.5/DT_In.py, line 704, in sort_sequence (Object: objectValues(['DTML Document']))
I'm embarassed, bad explanation on my part. I have an integer property on each document that I set to control the sequence in the list. The property is called 'order' (not a very good name) and is referenced here in the original code:
<!--#in expr="objectValues(['DTML Document'])" sort=order-->
Try
<!--#in expr="objectValues(['DTML Document'])"-->
and see how it works. Regards, - Craig -- Craig Allen - Managing Partner - Mutual Alchemy Information Architecture - http://alchemy.nu
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Craig Allen -
webman