Adam, You've posted this question to the zope-dev@zope.org list. This mailing list is about the technical internals of Zope, and developing new Zope products. Your question is more to do with using Zope as a web developer. You're more likely to get a useful response to your question if you post it to the zope@zope.org mailing list. I've cc-ed this message to that list instead of the zope-dev list. Also, please send messages to the zope mailing lists in plain text, not as HTML mail messages. Some folk find them difficult to read, and you won't get the benefit of their answering your queries. As for your query, I'm not exactly sure what you want to do, but perhaps the Zope Style Sheets product would help. http://www.zope.org/Members/haqa/ZStyleSheet_news You can also make dtml methods return dictionaries by including a line like the following: <dtml-return "{'foo':'value for foo', 'bar':'value for bar'}"> You can use the following how-to to learn how to create random content. http://www.zope.org/Documentation/How-To/RandomContent I hope that helps.
Adam Pawliuk wrote:
Hi,
I want to find an efficient way of adding a dictionary of values to the Zope namespace, where a different dictionary could be set on each request.
I wanted to create a several dictionaries each containing properties for a look and feel (i.e. background colors, fonts etc), and switch them for each request.
For example I'd like to do something similar to what's done below (although the method below doesn't work). **************************************************************************************** <dtml-call "REQUEST.set('LookAndFeel',m_getRandomLookAndFeel())">
(assuming the Look and Feel Dictionary has key's LOOK_COLOR, and LOOK_FACE)
<dtml-with LookAndFeel> <font color="<dtml-var LOOK_COLOR>" face="<dtml-var LOOK_FACE>"> I know the with doesn't work for the dictionary, but would like to do something similar to this example. </font> </dtml-with> ****************************************************************************************
thanks in advance,
Adam
-- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net