Hi I'm trying to add text to the content of a DTML Method programmatically. Somehow I can't figure out how to do it. Changing a property is easy but the content has no property name. I know that it's probably really simple but I seem to have a blackout on thisone. Thanx for the hint in advance! Oliver ;-) -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net
On Wednesday 09 January 2002 05:29 am, Oliver Erlewein allegedly wrote:
Hi
I'm trying to add text to the content of a DTML Method programmatically. Somehow I can't figure out how to do it. Changing a property is easy but the content has no property name. I know that it's probably really simple but I seem to have a blackout on thisone.
Thanx for the hint in advance! Oliver ;-)
Looks like you have an itchy trigger finger pardner 8^) To update the contents of a DTML object, use the manage_edit call. as in: DTMLObject.manage_edit(data, title) This is documented in the API reference in the Zope online help (among other places). hth, /---------------------------------------------------\ Casey Duncan, Sr. Web Developer National Legal Aid and Defender Association c.duncan@nlada.org \---------------------------------------------------/
First, I apologize in advance: this is more a minor syntax problem than anything else, and a combination of my laziness and incompetence at basic programming ("I'm a SysAdmin, not a *programmer*!!") I have modified Tres Seaver's STX_Document product to include a property "topic". I have figured out how (stolen the code) to sort all the 'STX_Document's within a folder, sorting all documents by property and arranging them in a table. <dtml-in expr="_.sequence.sort(PARENTS[0].objectValues(['STX_Document']), (('topic', 'nocase'), ('title','cmp'), ))"> <th><dtml-var topic></th> <td><a href="<dtml-var URL1>/<dtml-var id>"> <dtml-var title> "<dtml-var description>" What I'd like to do next is grab each property in a variable to compare against the value of the *next* iteration. If it matches, don't print the topic name in the table header. If it doesn't match, print the topic name and set the temp variable to the new value. I *realize* this a basic department sort/subtotal algorithm, but I don't have the familiarity with Zope syntax to work it out, and deadlines lay poised like a gun pressed against my temple. Any tips, clues, helpful hints or seeing-eye dog coupons will be gratefully appreciated.... peace
participants (3)
-
Casey Duncan -
cgreen -
Oliver Erlewein