[Zope] [newbie] Property with <dtml-var> in it's value

Stefan Mallepell Stefan Mallepell" <steve@syso.ch
Wed, 18 Apr 2001 00:26:20 +0200


Hi Dieter

Thank you for your help!

But it looks like I really have kind of a problem. I write a bit more about
it, cause may you or someone else have a Idea for a solution.

I'm working on a website where we are a bit short of time ... (surprise
surprise ..;) ) And so I'm developing during other people already have
started to enter data. (that's what you never should do - but with a don't
get any money project - all volontiers - wrong communication ... ) So I
can't really redesign the structure.

The hole site is based on ZClasses. Most of them are folderish. The
attributes contain text (different attributs for different semantic). There
is also a Class for external links (a href ..). (It's nice to control them
in one place) Now I'm looking for a userfriendly possibility to access the
information of this "links" out of  the content attributes of the other
Instances. Sounds easy, isn't it ;) ...

Well, if anybody has a idea ... Your help would be welcome

thanks
Stefan

PS.: dokumentation / I haven't read all of it, but I studied a lot on
www.zope.org /  not word by word but problem orientated ...
your link was new for me
URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html I will
have a look, tomorrow - now I'm getting a bit tired and I have 3hours drive
befor I can go to bed ... this is a lovely project  ;) ...


----- Original Message -----
From: "Dieter Maurer" <dieter@handshake.de>
To: "Stefan Mallepell" <steve@syso.ch>
Cc: <zope@zope.org>
Sent: Tuesday, April 17, 2001 10:19 PM
Subject: Re: [Zope] [newbie] Property with <dtml-var> in it's value


> Stefan Mallepell writes:
>  > Was just a bit surprised and haven't found anything about this on
zope.org
>  > ....
>  >
>  > Can anyone tell me how I can make that a <dtml-var xxxx> which is
stored in
>  > a Property of a ZClass instance, will be "processed" when I reference
it in
>  > a dtml method. The property is from type "text" and there is normal
text in
>  > front and after the dtml-var statement.
> Did you already read the available documentation?
> the Zope book and
>
>   URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html
>
>
> Never mind. If I understand you right, then you want to do
> difficult things:
>
>   Do you want to have something like a "computed property",
>   say "title= 'What a great time <dtml-var ZopeTime>'"?
>   This title would be different, each time it will be accessed
>   because the time component would change.
>
>   Properties are not designed for that!
>   They are mappings of names to values of simple
>   types: string, integer, lists, dates... nothing complex.
>
>   The easiest way to emulate "computed" properties is
>   to use a folderish ZClass that uses DTML objects
>   or Python Scripts (External Methods) as property emulation.
>
>   There are more difficult solutions that wrap convert property values
>   into DTML objects and then render them....
>
> Dieter
>
>
> _______________________________________________
> 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 )
>