[Zope] conceptual problem with acquisition

Oleg Broytmann Oleg Broytmann <phd@mail2.phd.pp.ru>
Mon, 5 Mar 2001 15:23:15 +0300 (MSK)


On Mon, 5 Mar 2001, Oliver Frommel wrote:
>       <dtml-call "REQUEST.set('img', 'trans.gif')">
>       <dtml-if "_.hasattr(pics, img)">
>         <img src="pics/trans_gif" width="10" height="10"></td>
>       <dtml-else>
>         <img src="dir/pics/trans_gif" width="10" height="10"></td>
>       </dtml-if>
>
> but this is ugly and pretty inconvenient to do for every image

   Then so not do this for every image - write one DTML method that takes
imge name as a parameter, and call it for every image.

Oleg.
----
     Oleg Broytmann     http://www.zope.org/Members/phd/     phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.