#78: "Display" menu to select default view

Contents
  1. Motivation
  2. Proposal
  3. Implementation
  4. Participants
by Alexander Limi last modified Jan 21, 2010 07:29 AM

Enable, configure and clean up the UI for TemplateMixin in ATContentTypes, giving us a "display" drop-down to select the way in which an object will be displayed. Enable a simplified way of registering new views for third-party products.

Proposed by
Alexander Limi
Seconded by
Martin Aspeli
Proposal type
User interface
Repository branch
uiteam-plip77-78-content-menu-browser-default-refactoring
State
completed

Motivation

Let's get rid of CMFPhotoAlbum. :) You should be able to do this by having a photoalbum view of a folder and selecting this instead of the standard folderlisting. The same applies to many other use cases.

Proposal

  • Enable TemplateMixin and fix its UI.
  • Add a "display" drop-down where these can be chosen
  • Ghost this out when editing
  • On folderish items, an option "select item" - shows browser, select default_page.

We may also want a configlet for registering new templates with tool

Implementation

  • Content menu has been updated, and several scripts added which are used by them. Some unit tests added.
  • browserDefault() has been made aware of IBrowserDefault and can get the selected the layout if necessary.
  • A new method isDefaultPage() was added to PloneTool used to determine if an object is the default_page/index_html of its parent folder.

NOTE: There are two branches, one in ATCT and one in CMFPlone, and these two branches are shared by PLIPs 77 and 78, since they are closely related and were developed in parallel. The branches are:

  • https://svn.plone.org/svn/plone/CMFPlone/branches/uiteam-plip77-78-content-menu-browser-default-refactoring
  • https://svn.plone.org/svn/plone/ATContentTypes/branches/uiteam-plip77-78-content-menu-browser-default-refactoring

On the "refectoring" branch, dependencies have been refactored so that the marker interfaces are in CMFPlone, which ATCT optionally imports if HAS_PLONE2 is true. ConstrainTypesMixin is still defined in ATCT.

In the long run, the interface could be pushed down to CMFCore, and the mixin down to Archetypes.

Participants

David Convent (davconvent) and Martin Aspeli (optilude)