[Zope] Any way to know if in ZMI?
Casey Duncan
c.duncan@nlada.org
Fri, 2 Nov 2001 09:26:55 -0500
On Thursday 01 November 2001 12:58 pm, Sidnei da Silva allegedly wrote:
> There is any way or property that I can test to know if im inside the ZMI
> or not?
>
> Thanx.
One (somewhat inelegant) way is to check REQUEST for one of the globals it
sets:
<dtml-if expr="REQUEST.has_key('a_') or REQUEST.has_key('n_')">
We're in ZMI land
<dtml-else>
We're not
</dtml-if>
another one that might work (and seems a bit more readable) is:
<dtml-if expr="_.has_key('management_view')">
in the ZMI...
</dtml-if>
I didn't test this one though....
hth,
/---------------------------------------------------\
Casey Duncan, Sr. Web Developer
National Legal Aid and Defender Association
c.duncan@nlada.org
\---------------------------------------------------/