dtml-in appears to mess up the "space"
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! I think my question was a little too complex before. I've simplified it. How does dtml-in change the current "space" set by dtml-width. It appears that it does, please see my example below. Hopefully this is something easy/familiar to you. ========================= I have this hierarchy: ========================= - - root + squishdot - index_html + somefolder + someOtherFolder - somemethod ========================= This code works: (code is in root/squishdot/index_html) ========================= <dtml-with somefolder> <dtml-with someOtherFolder> <dtml-var somemethod> </dtml-with> </dtml-with> ========================= But this code doesn't: ========================= <dtml-with somefolder> <dtml-in "objectValues(['DTML Method'])"> <dtml-with someOtherFolder> <dtml-var somemethod> </dtml-with> </dtml-in> </dtml-with> ========================= I get this error from my Zope server, on the one that doesn't work. ========================= Error Type: AttributeError Error Value: __call__ I read in the manual that dtml-in changes some variables, but I can't figure out how to get around it, and I can't find anything in the manual. (FYI: I did RTFM) I appreciate any insight, Kevin Meinert -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com> iQA/AwUBOLg/nDlszdAdzf4MEQIahgCfVea1oh3UBxSSEYAMPFI1aXZ8TtkAniQM pfBRToHPEEM35K1fyTQ14GH0 =9vwM -----END PGP SIGNATURE-----
Kevin Meinert schrieb: [...]
========================= But this code doesn't: ========================= <dtml-with somefolder> <dtml-in "objectValues(['DTML Method'])"> <dtml-with someOtherFolder> <dtml-var somemethod> </dtml-with> </dtml-in> </dtml-with>
========================= I get this error from my Zope server, on the one that doesn't work. ========================= Error Type: AttributeError Error Value: __call__
Somebody else than me can explain much better the reason for it, but try: <dtml-with "someOtherFolder"> and your code should work. hth, Thomas
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The reason this wont work is that I need to iterate over the objects in "someFolder" (some code is missing here... thats why it's not evident). Then while im iterating over that folder's DTMLMethods, one of those methods need's to descend into the "someOtherFolder" folder. Just try my heirarchy out (it's below). It should make more sense then. Basically, I need "someOtherFolder" to be aquired by other folders than just the "someFolder" folder... That is why it is not a child of "someFolder". Any more ideas?
Somebody else than me can explain much better the reason for it, but try:
<dtml-with "someOtherFolder">
and your code should work.
hth, Thomas
- -----Original Message----- From: Thomas Weiner [mailto:weiner@tu-harburg.de] Sent: Saturday, February 26, 2000 5:18 PM To: kevn@vrac.iastate.edu Cc: zope@zope.org Subject: Re: [Zope] dtml-in appears to mess up the "space" Kevin Meinert schrieb: [...]
========================= But this code doesn't: ========================= <dtml-with somefolder> <dtml-in "objectValues(['DTML Method'])"> <dtml-with someOtherFolder> <dtml-var somemethod> </dtml-with> </dtml-in> </dtml-with>
========================= I get this error from my Zope server, on the one that doesn't work. ========================= Error Type: AttributeError Error Value: __call__
-----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com> iQA/AwUBOLhhgjlszdAdzf4MEQL2EQCg5hnJr69IGJ9UeQ6pPxBT5EmQxHwAn3AS j5KdXOnLZrR12tNnCLRekyUl =umhQ -----END PGP SIGNATURE-----
Kevin Meinert wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The reason this wont work is that I need to iterate over the objects in "someFolder" (some code is missing here... thats why it's not evident). Then while im iterating over that folder's DTMLMethods, one of those methods need's to descend into the "someOtherFolder" folder.
You don't need to wrap 'one of those methods' with a dtml-with to 'someOtherFolder', just make sure that 'those methods' can acquire someOtherFolder themselves. The <dtml-in> tag does push the current 'sequence-item' onto the namespace stack. This is normal and useful behavior. -Michel
participants (3)
-
Kevin Meinert -
Michel Pelletier -
Thomas Weiner