Martijn Faassen wrote:
Probably some mild level of Zope Zen is needed to realize fully that *folders* are acquired by subfolders too -- recently I faced similar organizational issues as well, and used this to good effect.
I had the same setup with a root folder and a number of sub folders, and common SQL methods in the root folder so that they were acquired. As I had quite a few SQL methods this started to get messy. So I made a subfolder called 'sql' and moved all SQL methods to that place. Now I have a nice and clean root folder.
Zen: All the sub folders acquire this SQL folder.
Of course I had to adapt my DTML documents in the subfolders from things like:
<!--#call "insert_whatever(REQUEST)"-->
to:
<!--#call "sql.insert_whatever(REQUEST)"-->
so it's easier to set this up the right way in the beginning.
You can use the same strategy for any common documents.
I really like the sound of this, and I've been re-organising my Zope application organisation, but I've hit a snag. I used to call DTML documents with <!--#var myfunction--> so now, since they are in a sibling folder under the root folder, (eg /myapp) I tried: <!--#var myapp.myfunction--> But it doesn't work any more - keeps giving KeyErrors. The funny thing is that <!--#var "myapp.myfunction"--> correctly returns all the raw content of the DTML document, so it *can* find it OK. Any ideas? Cheers, Martin -- ### Martin Dougiamas -- Internet Agent is == i see ### Centre for Educational Advancement ### http://cea.curtin.edu/staff/martin