Hi! On Wed, 17 Feb 1999, Hadar Pedhazur wrote:
Oleg, the latest license removes the requirement for attribution. It does, however, highly encourage it :-)
I sent my message and got first 5 answers within 5 minutes! Active, helpful and supportive community! :) Oleg. ---- Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ Programmers don't die, they just GOSUB without RETURN.
We have been unable to access properties of the new DTML Document objects in the same way we used to access properties of Folders. I don't know whether we are doing something wrong or we found an inconsistency in the new 1.10 Zope API. Here is a very simplified test case illustrating the issue. I have a folder with these contents: folder1 [Folder] - broken_html [DTML Document] - index_html [DTML Document] - sub-document (The Grand Sub-Document) [DTML Document] - sub-folder (The Grand Sub-Folder) [Folder] The source of index_html (which works) is: <!--#var standard_html_header--> <h2><!--#var title_or_id--></h2> <p>Title of sub-item: <!--#var expr="_['sub-folder'].title"--></p> <p>Author of sub-item: <!--#var expr="_['sub-folder'].author"--></p> <!--#var standard_html_footer--> This works as expected. The properties title and author of the sub-folder are retrieved. The source of broken_html is exactly the same, except for the sub-document reference: <!--#var standard_html_header--> <h2><!--#var title_or_id--></h2> <p>Title of sub-item: <!--#var expr="_['sub-document'].title"--></p> <p>Author of sub-item: <!--#var expr="_['sub-document'].author"--></p> <!--#var standard_html_footer--> Viewing this document-method I get a "Zope Unavailable" message with this traceback: <!-- Error type: Error value: 'string' object has no attribute 'title' --> </BODY></HTML> <!-- Traceback (innermost last): File M:\IDG\Zope\lib\python\ZPublisher\Publish.py, line 877, in publish_module File M:\IDG\Zope\lib\python\ZPublisher\Publish.py, line 590, in publish (Info: /testes/new_docs_props/broken_html) File M:\IDG\Zope\lib\python\OFS\DTMLDocument.py, line 212, in __call__ (Object: broken_html) File M:\IDG\Zope\lib\python\OFS\DTMLDocument.py, line 208, in __call__ (Object: broken_html) File M:\IDG\Zope\lib\python\DocumentTemplate\DT_String.py, line 513, in __call__ (Object: broken_html) File M:\IDG\Zope\lib\python\DocumentTemplate\DT_Util.py, line 266, in eval (Object: _['sub-document'].title) File <string>, line 0, in ? File M:\IDG\Zope\lib\python\DocumentTemplate\DT_Util.py, line 128, in careful_getattr AttributeError: (see above) --> So, how do I access properties of sub-documents from a sub-document in the same folder? []s Luciano Ramalho -- Not all who wander are lost. [J.R.R.Tolkien]
On Tue, 9 Mar 1999, Luciano Ramalho wrote:
folder1 [Folder] - broken_html [DTML Document] - index_html [DTML Document] - sub-document (The Grand Sub-Document) [DTML Document] - sub-folder (The Grand Sub-Folder) [Folder]
So, how do I access properties of sub-documents from a sub-document in the same folder?
One way is to use DTML Methods instead of DTML Documents. For more info visit: http://www.gaaros.com:9673/FAQ/ The issue you raise is currently the first entry in the FAQ Pavlos
participants (3)
-
Luciano Ramalho -
Oleg Broytmann -
Pavlos Christoforou