Hmmm... assuming that your ZStyleSheet is called css_content and your ZSSRule is called Body, what you have should work. I simply inherit from PropertyManager. The following code just worked for me in a trivial ZStyleSheet <dtml-var "css_content.dump(REQUEST)"> <dtml-call "css_content.Body.background.manage_changeProperties({'value':'#00cc00'})"> <dtml-var "css_content.dump(REQUEST)"> (The call to dump just displays the browser settings etc. for each node in the tree.) Adrian...
-----Original Message----- From: Danny William Adair [mailto:Danny@Adair.net] Sent: Friday 09 March 2001 04:47 To: zope@zope.org Cc: adrian@haqa.clara.net Subject: probably stupid: changing zstylesheet properties through dtml
How can I programmatically change A ZStyleSheet attribute (ZSSAttr) through dtml???
<dtml-with css_content> <dtml-with Body> <dtml-call "background.manage_changeProperties({'value' : new_bg})"> </dtml-with> </dtml-with>
won't do, it gets me an authentication request (whatever my role), telling me I am not allowed to access "changeProperties". It's not a ZClass, so there is no propertysheet I would have to define, is that right?
Through the management screen, everything works fine, but I want to change only a few attributes from a _dtml method_, and I simply don't know how to do it. I've given the method every available proxy role, and still.
I really believe that my problem is not ZStyleSheet-specific, but could anyone out there who has successfully done _this_ tell me how to do it?
Thx in advance,
Danny