Hello All, I don't understand why method__replaceable__ should suddenly allow a method to be replaceable? I see Chris that you have asked the question as well, but I still don't get it. 1. Why is there no method.__replaceable__(why the concatenation?) 2. Where is this behaviour documented in Zope. While we are on the topic, I still have not succeeded at doing something very simple. All I want to do is to include the result of a rendered object in another object so that I can produce content somewhere in my zope tree(this content might inherit some other content from higher in the tree) and then include that content in a display somewhere else (in a place where the original content cannot be acquired). file1 <dtml-var standard_html_header> <dtml-var menu> This var is aquired from my parent <dtml-var standard _html_footer> file2 <dtml-var standard_html_header> <dtml-var expr="/path/top/file1/file1.index_html()">This file is not in my acquisition tree and I just rendered its output for your convenience wrapped in a new header and footer! <dtml-var standard _html_footer> At the moment, I get a key-error telling me that file1 cannot find the <dtml-var menu> item so clearly it is not acquiring from its own tree. Thanks, Pieter -- ----------------------------- Pieter Claassen pieter@openauth.co.uk http://www.openauth.co.uk OpenAuth Tel: 01344 390530 DDI: 01344 390630/390631 Fax number: 01344 390700 Mobile: 0776 665 6924 Highview House Charles Square Bracknell Berkshire RG12 1DF TERMS AND CONDITIONS (i)The information contained in this email and attachments is only intended for the addressed recipient(s) and may not be distributed or viewed by any other party without the explicit consent of the sender. If you have received this message by accident, please contact Pieter Claassen (pieter@openauth.co.uk) and destroy any electronic or physical copies of the information contained in it, immediately. (ii)This email is not certified to be virus free and OpenAuth accepts no liability for losses arising from you receiving this email. (iii)Any digital signatures (if present) used to authenticate this email, only serves to allow you to verify the originating email address of the sender and should not be relied upon to prove identity or base financial transactions on, unless the Certificate Practice Statement that the signature references, explicitly states differently. (iv)This email may be subjected to further terms and conditions as published on the company website at http://www.openauth.co.uk. If you need to rely on the information contained in this email in any way, then you should read those terms and conditions to understand how much you can trust the information in this email. (v)OpenAuth retains the copyright on any relevant material that is included in this email.
pieter claassen wrote:
1. Why is there no method.__replaceable__(why the concatenation?)
Method objects in python can't have arbitary attributes.
2. Where is this behaviour documented in Zope.
There's a project on the Fishbowl, IIRC.
While we are on the topic, I still have not succeeded at doing something very simple. All I want to do is to include the result of a rendered object in another object so that I can produce content somewhere in my zope tree(this content might inherit some other content from higher in the tree) and then include that content in a display somewhere else (in a place where the original content cannot be acquired).
file1 <dtml-var standard_html_header> <dtml-var menu> This var is aquired from my parent <dtml-var standard _html_footer>
file2 <dtml-var standard_html_header> <dtml-var expr="/path/top/file1/file1.index_html()">This file is not in my acquisition tree and I just rendered its output for your convenience wrapped in a new header and footer! <dtml-var standard _html_footer>
You can do the above with two page templates ;-) file1 <html metal:use-macro="here/main_template/> file2 <html metal:use-macro="here/main_template> <body> <tal:x tal:replace="root/path/top/file1/file1.index_html"/> </body> </html>
At the moment, I get a key-error telling me that file1 cannot find the <dtml-var menu> item so clearly it is not acquiring from its own tree.
DTML is evil. Don't use it. cheers, Chris
participants (2)
-
Chris Withers -
pieter claassen