[Zope] python expression in tal:attributes
Jens Vagelpohl
jens at dataflake.org
Wed Aug 30 08:45:00 EDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 30 Aug 2006, at 14:40, Ferhat Ayaz wrote:
> but my site root is /Site and not /, which can be
> changed later.
> Should I define this as a variable, or is there a
> better way?
Yes there is. Ditch hardcoded strings and ask the objects themselves
for their path. So in your code you could say...
Site.absolute_url()
instead of "/" or "/Site", because it will do the right thing with
virtual hosting.
jens
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFE9YhMRAx5nvEhZLIRApbJAJ4x+iwpT68gyBIfpBCIQmRTrrJWgQCgpyH4
JIRjVtOC/Y8sCas6ffvDYRs=
=UfE6
-----END PGP SIGNATURE-----
More information about the Zope
mailing list