[Zope] How do I detect in DTML when I'm in the management interface?

Jason Byron jason_zope@yahoo.com
Thu, 1 Jun 2000 14:09:49 -0700 (PDT)


I have a ZClass that I would like to be able to create
using the management interface and in DTML from the
users end with the same DTML script.  I believe I need
something like this to get it to work:

(if in management interface)

<dtml-call "create_my_zclass(_.None, _)">

(else)

<dtml-with "manage_addProduct['my_zclass']">
<dtml-call "create_my_zclass(_.None, _, NoRedir=1)">
</dtml-with>

and create_my_zclass has this code in it:

<dtml-with
"my_zclass.createInObjectManager(REQUEST['id'],
REQUEST)">
<dtml-call
"propertysheets.my_zclass_info.manage_editProperties(REQUEST)">
</dtml-with>
...

How do I create the first if else?
Is there a better/easier way of doing this?




__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/