[Zope] display owner [repost]
Pierre-Julien Grizel
grizel@mouli.net
Thu, 26 Oct 2000 19:28:04 +0200
Patrick Koetter wrote:
>
> Hi all,
>
> I posted this the last days, but didn't get quite what I needed.
>
> I'm looking for a way to get the Owners Name of an object (e.g. DTML-Method
> or -Document etc.) in order to display this to the surfers when they drop
> by.
>
> I've searched through zope.org code, took a look at the Owned.py etc. I just
> can't figure it out. Somebody help me?
>
> Thanks,
>
> p@
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
Yes, not so obvious, but this might work :
<dtml-if get_local_roles>
<dtml-in get_local_roles>
<dtml-if "'Owner' in _['sequence-item'] and _['sequence-key'] !='za'">
<dtml-if one_owner_already_mentioned>
<dtml-else>
Managed by
<dtml-call "REQUEST.set('one_owner_already_mentioned','yes')">
</dtml-if>
<dtml-var sequence-key><br>
</dtml-if>
</dtml-in>
</dtml-if>
</dtml-if>
This is based on a previous post (about a year ago ?...) by someone else
I cannot thank - as I cannot remember his name ! :-))
P.-J.
--
If the only tool you have is a hammer,
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau,
vous avez tendance à voir chaque problème comme un clou.
--Abraham Maslow