Re: newbie question: make reference to a 'foreign' variable
Hi,
I tried both but none worked. The latter one gave back an Attribute Error whereagainst the first nothing. My Folder B is a root-folder and A is a subfolder. any other ideas....? thanks I'm not sure what you mean with "dtml variable". If you mean a folder property, a dtml-method or a dtml-document, then both solutions work with A as a subfolder and B in root. See the following document for more info: http://www.zope.org/Documentation/Books/ZopeBook/current/AdvDTML.stx
Regards, Josef.
Hi, sorry, I meant the folder A is not a subfolder of B but of some other folder X which is also a root folder itself. -B | --variable(dtml method) -X | -A | --dtml-document(here, i want to make a reference to the variable in folder B) hope, now is my problem clear... --- Josef Meile <jmeile@hotmail.com> schrieb: > > Hi,
I tried both but none worked. The latter one gave back an Attribute Error whereagainst the first nothing. My Folder B is a root-folder and A is a
subfolder.
any other ideas....? thanks I'm not sure what you mean with "dtml variable". If you mean a folder property, a dtml-method or a dtml-document, then both solutions work with A as a subfolder and B in root. See the following document for more info:
http://www.zope.org/Documentation/Books/ZopeBook/current/AdvDTML.stx
Regards, Josef.
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
__________________________________________________________________ Gesendet von Yahoo! Mail - http://mail.yahoo.de Bis zu 100 MB Speicher bei http://premiummail.yahoo.de
Hello, try use this method: <dtml-var "restrictedTraverse(dtml-document)"> Using this, you get the dtml-document's namespace. Or use: <dtml-with dtml-document><dtml-var variable></dtml-with>, <dtml-let var=...></dtml-let> DW. ----- Original Message ----- From: "Sungmook Kim" <dotorimook@yahoo.com> To: <zope@zope.org> Sent: Saturday, February 08, 2003 2:32 PM Subject: Re: [Zope] Re: newbie question: make reference to a 'foreign' variable
Hi,
sorry, I meant the folder A is not a subfolder of B but of some other folder X which is also a root folder itself.
-B | --variable(dtml method) -X | -A | --dtml-document(here, i want to make a reference to the variable in folder B)
hope, now is my problem clear...
--- Josef Meile <jmeile@hotmail.com> schrieb: > > Hi,
I tried both but none worked. The latter one gave back an Attribute Error whereagainst the first nothing. My Folder B is a root-folder and A is a
subfolder.
any other ideas....? thanks I'm not sure what you mean with "dtml variable". If you mean a folder property, a dtml-method or a dtml-document, then both solutions work with A as a subfolder and B in root. See the following document for more info:
http://www.zope.org/Documentation/Books/ZopeBook/current/AdvDTML.stx
Regards, Josef.
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
__________________________________________________________________
Gesendet von Yahoo! Mail - http://mail.yahoo.de Bis zu 100 MB Speicher bei http://premiummail.yahoo.de
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
On Sat, 2003-02-08 at 08:32, Sungmook Kim wrote:
Hi,
sorry, I meant the folder A is not a subfolder of B but of some other folder X which is also a root folder itself.
-B | --variable(dtml method) -X | -A | --dtml-document(here, i want to make a reference to the variable in folder B)
Ok, you seem to be using 'root folder' to mean 'a folder in the root folder'. There is onmly one root folder ('/'). So your diagram should be: / +-B | +-variable | +-X +-A +-dtml-document So, the simple way to solve this is to start from the root folder and work your way down: <dtml-with "PARENTS[-1]"> <dtml-with B> <dtml-var variable> </dtml-with> </dtml-with> "PARENTS[-1]" always get's you the root folder in Zope. This code will always get you variable-of-B-of-root, no matter where in the tree you call it from. -- Michael R. Bernstein <webmaven@lvcm.com>
participants (4)
-
Eduardo Bastos -
Josef Meile -
Michael R. Bernstein -
Sungmook Kim