3 Aug
2001
3 Aug
'01
2:46 p.m.
kent sin wrote:
Error Type: Undefined Error Value: "You are not authorized to access icon." not found in "item1/icon"
How could I prevent this happen? Or to provide an default icon instead?
Whenever you use a path that may fail, you can provide a fallback path using the "|" operator. The most common fallback paths are "default" and "nothing", but you can use any path. For example: Default (leave src value alone): <img src="/images/default_icon" tal:attributes="item1/icon | default"> Dynamic fallback: <img src="icon" tal:attributes="item1/icon | here/default_icon"> Cheers, Evan @ 4-am & Zope