[Zope-dev] Namespace Questions
Adam Pawliuk
apawliuk@aui.ca
Fri, 14 Jul 2000 09:41:16 -0700
This is a multi-part message in MIME format.
------=_NextPart_000_0005_01BFED77.A80D5380
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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=3D"<dtml-var LOOK_COLOR>" face=3D"<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
------=_NextPart_000_0005_01BFED77.A80D5380
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I want to find an efficient way of =
adding a=20
dictionary of values to the Zope namespace, where a different dictionary =
could=20
be set on each request.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I wanted to create a several =
dictionaries each=20
containing properties for a look and feel (i.e. background colors, fonts =
etc),=20
and switch them for each request.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>For example I'd like to do something =
similar to=20
what's done below (although the method below doesn't work).</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>****************************************************************=
************************</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><dtml-call=20
"REQUEST.set('LookAndFeel',m_getRandomLookAndFeel())"></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>(assuming the Look and Feel Dictionary =
has key's=20
LOOK_COLOR, and LOOK_FACE)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><dtml-with =
LookAndFeel></FONT></DIV>
<DIV><FONT face=3DArial size=3D2> <font =
color=3D"<dtml-var=20
LOOK_COLOR>" face=3D"<dtml-var LOOK_FACE>"></FONT></DIV>
<DIV><FONT face=3DArial size=3D2> I know the =
with doesn't=20
work for the dictionary, but would like to do something similar to this=20
example.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> </font></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></dtml-with></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>****************************************************************=
************************</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>thanks in advance,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Adam</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_0005_01BFED77.A80D5380--