[Zope] var rendering question

J Kinsley jkinsley@horus.bticc.net
Sun, 13 Jun 1999 06:30:18 -0400 (EDT)


On Sat, 12 Jun 1999, Tony McDonald wrote:

> Date: Sat, 12 Jun 1999 09:35:49 +0100
> From: Tony McDonald <tony.mcdonald@ncl.ac.uk>
> To: J Kinsley <jkinsley@horus.bticc.net>
> Cc: zope <zope@zope.org>
> Subject: Re: [Zope] var rendering question
> 
> > After two and a half weeks of tinkering with Zope, I have decided
> > that I will ditch my conventional web technology for this new alien
> > technology.  It has already rewired half my brain, so I might as well
> > go for a complete rewiring job.  You sure you guys at DC aren't from
> > another planet? ;-)
> >
> 
> As another recent immigrant, welcome to planet Zope. If you think your brain
> is rewired now, wait till you experience the 'lightbulb effect' of
> acquisition! :)

I got the impression it is going to be that way.  A period of time
when it does not make a whole lot of sense, then one day...Eureka, it
all falls into place.  

<snip>


> I think you need to do a level of indirection to get to your goal. In the
> first instance (frameset) you want the contents of title_src. You get that
> via <!--#var title_src--> (as you said). In the second instance, you want
> the contents of the variable whose name is given by the value of title_src
> (I think that you should make title_src a property BTW).

Perhaps in time.  I am paranoid of the idea of having the only copy
of my code existing in a database.  I prefer code being in text files
so it does not have to be rewritten from scratch if the database gets
corrupted.

> 
> something like
> 
> <table>
> <tr>
> <td colspan=2>
> <!--#var "_[title_src]"-->
> </td>
> ...
> </tr>
> </table>
> 
> should work - well it did on my box! :)

Eventually it did work.  I had tried something like that before
posting to the list, but I had <!--#var "_['title_src']"--> which
returned the same results as <!--#var title_src-->.  Without the
quotes around title_src, I was getting a KeyError.  It turned out
that it was due to using "/Title.dtml" instead of "Title.dtml".  
Once I removed the '/', it worked.


> This is from Amos' guide to Advanced DTML (don't let the title put you off
> though). Available at http://www.zope.org/Documentation/HowTo/DTML

Well, to be honest, I am not to crazy about the documentation.  It is
too obscure and too spread out.  IMHO, what is needed is a 'Zope
Quick Reference'.  Something like the PHP3 reference.  Then again,
maybe it's because I have yet to attain Zope Enlightenment. ;-)

Anyway, thanks for the help.  I'm sure I am going to have further
questions as I continue down this path.

Regards,
Jarrod

> 
> HTH
> tone.
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>