[Zope-CMF] Determining the current view

J C Lawrence claw@kanga.nu
Sat, 08 Feb 2003 01:56:38 -0800


I'm writing a page template for a side box which I only want to display
for specific views of objects.  How can I, in a page template,

  a) Check that the thing currently being viewed is not a page template
  or DTML method or script (ie it has to be a "real" object)?

and,

  b) Check that the object view method on the object is being invoked,
  and not, for instance, folder_content, edit, or some other view of the
  object?

More simply:

  I want the side box to display only when viewing first-class objects,
  and not to be displayed when viewing non-default representations of
  those objects, or when viewing dynamically computed objects.  How can
  I do this?

--
J C Lawrence
---------(*)                Satan, oscillate my metallic sonatas.
claw@kanga.nu               He lived as a devil, eh?
http://www.kanga.nu/~claw/  Evil is a name of a foeman, as I live.