[Zope] variables in path expressions
Casey Duncan
casey@zope.com
Sat, 9 Nov 2002 23:10:02 -0500
So, given a list of pages you would like them to either be rendered if th=
e=20
exist or have nothing inserted.
Sounds like a job for the lighty documented ? character in path expressio=
ns.
Try something like:
<div tal:replace=3D"here/?thepage | nothing">Page Content</div>
hth,
-Casey
On Saturday 09 November 2002 09:42 pm, Mark Gibson wrote:
> For your consideration:
>=20
> <span tal:omit-tag=3D""
> tal:repeat=3D"thepage python:['pageA','pageB']">
> <span tal:condition=3D"nocall:here/thepage | nothing"
> tal:content=3D"structure here/thepage"></span>
> </span>
>=20
> Basicaly, I want to test if 'pageA' exists, and if so, render it. I'd=20
> like to do something like tal:condition=3D"nocall:here/$thepage |=20
> nothing", but this doesn't seem to work.
>=20
> Any ideas of how to do this?
>=20
> Thanks,
> Mark