[Zope] - Accessing objects in subfolders

Jim Fulton jim.fulton@digicool.com
Mon, 11 Jan 1999 11:19:29 -0500


John Mitchell wrote:
> 
> On Sun, 10 Jan 1999, Andy Smith wrote:
> 
> > Try using...
> > <!--#in "subfolder.some_sql_method"-->
> > Cheers,
> > Andy.
> 
> A suggestion:  start updating all sample code to *always* quote the in/if
> expressions.  That is, when I was playing with Bobo a few weeks ago I had
> this problem:
> 
>   <!--#if zoot-->               works
>   <!--#if zoot.allures-->       doesnt work
>   <!--#if "zoot.allures"-->     works
>   <!--#if "zoot"-->             (works)
> 
> Darned confusing, unless you have that magic ingredient *coffee*, of which
> I can pay you tuesday for a couple pounds of extra-special grind today.

This is not an unreasonable approach, however, if you take
this approach, you will lose the automagic calling of methods.

If zoot is a (non-document-template) method, then

  <!--#if zoot-->

is the same as:

  <!--#if "zoot()"-->

not

  <!--#if "zoot"-->

If zoot is a document template, then:

  <!--#if zoot-->

is equivalent to:

  <!--#if "zoot(None,_)"-->

Jim

--
Jim Fulton           mailto:jim@digicool.com
Technical Director   (888) 344-4332              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.