[Zope] another "issue.1999.01"-Problem

Tom Schwaller Tom.Schwaller@linux-magazin.de
Sun, 12 Sep 1999 02:27:48 +0200


well, after some strugling here is my final solution for
what I wanted to do. Maybe this is of some use for somebody
(not really difficult although I had a hard time getting it).
The Input form get the variables Kundenid, Wo, MyURL, and file:
(Replace "Wo" by "Where" and "Kundenid" by "customerid" if you 
prefer that)

-------------------------------------------------------------
<dtml-var standard_html_header>

<br>
your banner-placement in the directory
<a href="<dtml-var BASE0>/<dtml-var Wo>">/<dtml-var Wo></a>

<dtml-if "Wo == ''">
<dtml-call "REQUEST.set('Wo', PARENTS[-1])">

<dtml-elif "_.string.find(Wo, '/') == -1">
<dtml-call "REQUEST.set('Wo', _.getattr(PARENTS[-1], Wo))">

<dtml-else>
<dtml-in "_.string.split(Wo, '/')">
<dtml-if sequence-start>
<dtml-call "REQUEST.set('Wo', _.getattr(PARENTS[-1],
_['sequence-item']))">
<dtml-else>
<dtml-call "REQUEST.set('Wo', _.getattr(Wo, _['sequence-item']))">
</dtml-if>
</dtml-in>

</dtml-if>

<dtml-with Wo>
<dtml-if "'banner' in objectIds()">
<dtml-call "manage_delObjects(ids=['banner'])">
</dtml-if>
<dtml-call "manage_addImage(id='banner',file=file)">
<dtml-call "banner.manage_addProperty('url', MyURL, 'string')">
<dtml-call "banner.manage_addProperty('Kundenid', Kundenid, 'int')">
</dtml-with>

was successfull!

<dtml-var standard_html_footer>


-- 

Tom