I got a folder called SQL in the root-folder containing SQL-methods I use site-wide. I got a DTML-method, taking two parameters, also in the root-folder I call site-wide using SQL-methods in the mentioned folder. When I try to use the DTML-method in a DTML-document in a sub-folder I get an error, saying "global name 'SQL' is not defined". The sub-folder contain a SQL-folder also, with SQL-methods used in that part of the site. I call my DTML-method like so in a DTML-document in a subfolder : <dtml-var expr="dmViewComments(com_object=1, com_object_id=coi)"> The DTML-method dmViewComments in the root-folder look something like this : <dtml-call "SQL.sqlmViewComments(REQUEST)"> <!-- and then some more code --> I need a way to store DTML- and SQL-methods in the root-folder and call them site-wide. Can I somehow make a special folder that makes it contents available site-wide, while being defined one place for easy maintenance? Best regards, Thomas
Assuming I understand your issue, go here: http://www.zopelabs.com/cookbook/1003151229 This will tell you how to access the root object. You can then just use <whatever root accessor>.SQL.method. Or some complicated DTML syntax variant of that.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Thomas Weholt Sent: Wednesday, July 24, 2002 9:27 AM To: zope@zope.org Subject: [Zope] Newbie: One location for SQL-methods site-wide
I got a folder called SQL in the root-folder containing SQL-methods I use site-wide. I got a DTML-method, taking two parameters, also in the root-folder I call site-wide using SQL-methods in the mentioned folder. When I try to use the DTML-method in a DTML-document in a sub-folder I get an error, saying "global name 'SQL' is not defined". The sub-folder contain a SQL-folder also, with SQL-methods used in that part of the site.
I call my DTML-method like so in a DTML-document in a subfolder : <dtml-var expr="dmViewComments(com_object=1, com_object_id=coi)">
The DTML-method dmViewComments in the root-folder look something like this : <dtml-call "SQL.sqlmViewComments(REQUEST)"> <!-- and then some more code -->
I need a way to store DTML- and SQL-methods in the root-folder and call them site-wide. Can I somehow make a special folder that makes it contents available site-wide, while being defined one place for easy maintenance?
Best regards, Thomas
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Don't know if I this helps, but have you tried the Transparent Folders product? Check it out, you can put everything you need in one place (say /SQL), but they will actually be available in root. Regards, Jorge M. Thomas Weholt wrote:
I got a folder called SQL in the root-folder containing SQL-methods I use site-wide. I got a DTML-method, taking two parameters, also in the root-folder I call site-wide using SQL-methods in the mentioned folder. When I try to use the DTML-method in a DTML-document in a sub-folder I get an error, saying "global name 'SQL' is not defined". The sub-folder contain a SQL-folder also, with SQL-methods used in that part of the site.
I call my DTML-method like so in a DTML-document in a subfolder : <dtml-var expr="dmViewComments(com_object=1, com_object_id=coi)">
The DTML-method dmViewComments in the root-folder look something like this : <dtml-call "SQL.sqlmViewComments(REQUEST)"> <!-- and then some more code -->
I need a way to store DTML- and SQL-methods in the root-folder and call them site-wide. Can I somehow make a special folder that makes it contents available site-wide, while being defined one place for easy maintenance?
Best regards, Thomas
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Jorge O. Martinez MIS Senior Associate FDCH-eMedia Inc. 2400 Forbes Blvd., Suite 200 Lanham, MD 20706 E-mail => jmartinez@eMediaMillWorks.com Phone => (301)731-1228 ext. 105 Fax => (301)731-0937
I think transparent folders was recently declared a Bad Thing but my search of the archives isn't bearing fruit.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jorge O. Martinez Sent: Wednesday, July 24, 2002 11:41 AM To: Thomas Weholt Cc: zope@zope.org Subject: Re: [Zope] Newbie: One location for SQL-methods site-wide
Don't know if I this helps, but have you tried the Transparent Folders product? Check it out, you can put everything you need in one place (say /SQL), but they will actually be available in root.
Regards,
Jorge M.
Hi: You are right, but I think the problems I've seen are for people doing upgrades from a much older Zope version (I think, search the list for corroboration). Jorge M. Charlie Reiman wrote:
I think transparent folders was recently declared a Bad Thing but my search of the archives isn't bearing fruit.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jorge O. Martinez Sent: Wednesday, July 24, 2002 11:41 AM To: Thomas Weholt Cc: zope@zope.org Subject: Re: [Zope] Newbie: One location for SQL-methods site-wide
Don't know if I this helps, but have you tried the Transparent Folders product? Check it out, you can put everything you need in one place (say /SQL), but they will actually be available in root.
Regards,
Jorge M.
-- Jorge O. Martinez MIS Senior Associate FDCH-eMedia Inc. 2400 Forbes Blvd., Suite 200 Lanham, MD 20706 E-mail => jmartinez@eMediaMillWorks.com Phone => (301)731-1228 ext. 105 Fax => (301)731-0937
participants (3)
-
Charlie Reiman -
Jorge O. Martinez -
Thomas Weholt