[Zope] Special-name of variables called 'name' or 'domain'

Mayers, Philip J p.mayers@ic.ac.uk
Wed, 10 Jan 2001 13:22:46 -0000


That was how I had the code originally. Didn't help. I've already read the
Zope 'book' (if I were using 2.3 (which I can't, because LoginManager
doesn't work OOTB), I'd be using Python methods to do most of this instead.
I'm not, I'm using 2.2.5)

Thanks anyway.

Regards,
Phil

+----------------------------------+
| Phil Mayers, Network Support     |
| Centre for Computing Services    |
| Imperial College                 |
+----------------------------------+  

-----Original Message-----
From: Chris Withers [mailto:chrisw@nipltd.com]
Sent: 10 January 2001 13:09
To: Mayers, Philip J
Cc: 'zope@zope.org'
Subject: Re: [Zope] Special-name of variables called 'name' or 'domain'


"Mayers, Philip J" wrote:
<snip>
Try this:

Change your show method in root to be as follows:

<dtml-in get_machine_hosts>
 <dtml-var show_row>
 <dtml-in get_host_aliases>
  <dtml-var show_row>
 </dtml-in>
</dtml-in>

And add another DTML method in root as follows:

show_row:
<TR>
  <TD><dtml-var ip missing></TD>
  <TD>&dtml-name;</TD>
  <TD>&dtml-domain;</TD>
</TR> 

so you have:
 /root
   get_machine_hosts (SQL method)
   get_host_aliases (SQL method)
   show (dtml method)
   show_row (dtml method)

Does that solve your problem?
(I know it doesn't sovle any concerns you have about dtml-with and SQL
method, but your posting wasn't exactly to reproduce, and so even if
submitted to the collector, isn't likely to get followed up)

> While I'm at it, is <dtml-with foldername><dtml-var
dtmlmethod></dtml-with>
> really the best way to call a DTML method of a folder?

Mostly, yes...

BTW, checkout http://www.zope.org/Members/michel/ZB/ and have a good
read :-)

cheers,

Chris