[Zope] lateral aquisition
Hung Jung Lu
hungjunglu@hotmail.com
Thu, 09 Mar 2000 09:23:41 PST
chris withers <chris-@nipltd.com> wrote:
><dtml-var "parents[1].test2.index_html">
>...
><dtml-var "parents[0].test2.index_html">
I believe you have to supply the (_.None, _)
parameter for the index_html method to work.
You are ALMOST ALWAYS better off using the
<dtml-with ...> tag, something like
<dtml-with test2>
<dtml-var a_something_inside_test2>
</dtml-with>
Or in the more general case of many layers
<dtml-with "FolderA.SubFolderB.SubSubFolderC.test2">
<dtml-var methodA>
</dtml-with>
This pushes test2 onto the namespace stack. So
your methodA can still access objects inside
the SubSubFolderC.
------------------------------------------------
Use the dotted notation, e.g:
<dtml-var "F1.SF2.methodA(_.None, _)">
only if you don't need any objects from the
subfolder F1.SF2 during the call. Most of the
times, this is not what you want.
------------------------------------------------
Hung Jung
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com