[Zope] tal conditional help

David Bear David.Bear at asu.edu
Tue Dec 12 16:57:02 EST 2006


I have a page template that <div> tag to insert another template.
currently I do

<div content="structure here/form.pt">
  form template
 </div>

I rely on the form.pt object to exist in the folder where the template
is called from. This works okay. However, I think it would be wise to
put some kind of error checking in the tal to avoid sending some kind
of exception to the browser.

what I think would be the correct thing is to test if form.pt exists,
if not do insert nothing, otherwise insert it as above.

However I can't seem to locate any tal syntax that lets me do this.

I found tal:condition but haven't found any examples of using a
'exists' type of condition.

Any pointers?

-- 
David Bear
phone: 	602-496-0424
fax: 	602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 "Beware the IP portfolio, everyone will be suspect of trespassing"


More information about the Zope mailing list