[Zope] dtml, cookies, forms, problems
Andreas Pakulat
ap125@informatik.uni-rostock.de
Mon, 19 May 2003 22:57:34 +0200
--9amGYk9869ThD9tj
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On 19.Mai 2003 - 13:08:45, Jordan Carswell wrote:
> Trying to figure out a way to compare a user's cookie (zwiki_theme)=20
> with the options in a form list and if the cookie value and option=20
> value match, that option will be 'selected'. Here's the code I've=20
> played around with in which nothing is returned. Any help would be=20
> appreciated.
>=20
>=20
> <h2>Available Themes</h2>
> <dtml-let usertheme=3D"REQUEST.get('zwiki_theme')">
> <select name=3D"zwiki_theme">
> <dtml-in expr=3D"themes.objectValues('File')" sort=3Dtitle>
> <option value=3D"&dtml-absolute_url;"
> <dtml-if "absolute_url =3D=3D usertheme">selected</dtml-if>>
I would change that to:
<dtml-if "absolute_url =3D=3D usertheme">
<option value=3D"&dtml-absolute_url;" selected>
<dtml-else
<option value=3D"&dtml-absolute_url;">
</dtml-if
Andreas
--=20
Your mode of life will be changed for the better because of good news soon.
--9amGYk9869ThD9tj
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE+yUU+uekl0h+nrMIRAgIBAKDRCUcEzIC2zRaxWvii+9g6LFDyoACfd9PT
wLjdbxSOgx5iTzhJ4MD7qNY=
=wz+I
-----END PGP SIGNATURE-----
--9amGYk9869ThD9tj--