RE: [Zope] organizational questions
Martin wrote:
Putting it in quotes means that the contents of the DTML document are inserted "raw" into my current document, rather than being evaluated.
Inconsistency number eleven -- you need to do: <!--#var "myapp.myfunction()"--> This will call 'myfunction' rather than just insert it. --Paul
Paul Everitt wrote:
Martin wrote:
Putting it in quotes means that the contents of the DTML document are inserted "raw" into my current document, rather than being evaluated.
Inconsistency number eleven -- you need to do:
<!--#var "myapp.myfunction()"-->
This will call 'myfunction' rather than just insert it.
Ah! Thanks, Paul. I had tried that, but it just gave a similar error to all my other permutations. I realise now that it was a different error, caused by the callee no longer having access to the name space (eg REQUEST, etc) of the caller, as it had before. Passing variables around explicitly will kinda spoil all the nice clean zopish zen I've been accumulating so I think I'll just stick to putting "myapp" in the path. Thanks again. Once I get a bit more of a handle on all this and get my first product out (an application for producing online courses) I'll be very happy to help with the ZDP, and perhaps NG DTML. :) Cheers, Martin -- ### Martin Dougiamas -- Internet Agent is == i see ### Centre for Educational Advancement ### http://cea.curtin.edu/staff/martin
Paul Everitt wrote:
Martin wrote:
Putting it in quotes means that the contents of the DTML document are inserted "raw" into my current document, rather than being evaluated.
Inconsistency number eleven -- you need to do:
Shhh! Don't tell Jim Fulton! (see his earlier post :). It's NOT inconsistent, it's just confusing. ;)
<!--#var "myapp.myfunction()"-->
This will call 'myfunction' rather than just insert it.
Right -- I've been passing REQUEST in my DTML myself, though earlier I see Jim saying something like: <!--#var "myapp.myfunction(None, _)"--> Sorry for the misleading example. I vaguely wonder if that fixes some earlier thing that baffled me to no end a while ago... Anyway, in my opinion DTML does too many implicit things that I can't fully grok yet. I hope I won't offend anyone, but DTML is too much like Perl. It's powerful but has too many dark corners, and it can look ugly. Which is why I'm agitating for NG DTML. Of course, feel free to ignore if you like. Since it's open source I should go code it myself... Regards, Martijn
participants (3)
-
Martijn Faassen -
Martin Dougiamas -
Paul Everitt