Acquiring root index_html method in lower level folder
From a Zope newbie... Given: "root" folder index_html method which refers to menu_bar and body_content menu_bar method body_content method "about" folder body_content method
Trying to browse root/about folder directly and expecting 1. inherited index_html method to be displayed and it does 2. which refers to menu_bar method and it is displayed but... I expected body_content method in "about" folder but instead it displayed body_content in root folder? I copied index_html method into the about folder then it worked ok. I considered factoring out the body_content from root and placing in a lower lever "home" folder, but how do you handle browsing the root folder which no longer contains the body_content to default to the home folder body_content if not being called from lower level folder (such as abot or home)? Thanks.
Milt Martin wrote:
From a Zope newbie... Given: "root" folder index_html method which refers to menu_bar and body_content
^^^^ are you sure that index_html is a DTML method and not a DTML document? This should work (and it does, because I do this), but only if index_html is a method, because when it is acquired by the "about" folder it takes on the context of the folder. If index_html was a document, it has its own context when acquired and will pick up its methods from the origal location (as you seem to be experiencing).
menu_bar method body_content method "about" folder body_content method
Trying to browse root/about folder directly and expecting 1. inherited index_html method to be displayed and it does 2. which refers to menu_bar method and it is displayed but... I expected body_content method in "about" folder but instead it displayed body_content in root folder? I copied index_html method into the about folder then it worked ok. I considered factoring out the body_content from root and placing in a lower lever "home" folder, but how do you handle browsing the root folder which no longer contains the body_content to default to the home folder body_content if not being called from lower level folder (such as abot or home)? Thanks.
-- Bruce Elrick, Ph.D. Saltus Technology Consulting Group Personal: belrick@home.com IBM Certified Specialist Business: belrick@saltus.ab.ca ADSM, AIX Support, RS/6000 SP, HACMP
participants (2)
-
Bruce Elrick -
Milt Martin