[Zope] render/parse function ? (using <dtml-var x> in a property sheet ?) sheet ?)

chas panda@skinnyhippo.com
Sun, 09 Apr 2000 03:04:55 +0900


Sorry to bother you all again, but solving this problem
would save a lot of jumping through hoops and I was 
surprised that nobody else has encountered it.

Consider :
- we have a ZClass string property called 'myproperty'.
- we set the value of 'myproperty' to "Hello <dtml-var FirstName>" 
  where FirstName is a variable whose value is set to 'Fred'
- we now try to render the value of 'myproperty' inside a DTML 
  method using the DTML : 
  	<dtml-var myproperty> 
- as would be expected, the following is displayed -
  "Hello <dtml-var FirstName>" since it is just a string.
  But really we wanted it to display "Hello Fred"
  ie. to evaluate the DTML tags. 

Is there any method that can be called to parse 
the value of a property and evaluate the DTML ?  

Thank you very much,

chas


ps. To circumvent the above, I could create a DTML method 
called 'myproperty'. However, with 30 such properties it 
would be far nicer and faster to edit them in ZClass property 
sheets.
I guess it would be nice if there were some ZClass property 
of type 'renderThis' where the contents will be rendered
by Zope just as a DTML method's contents are. In lieu of
this, any hacks would be appreciated :)