Notes on Customizing a CPS Site

Author: Dave Kuhlman
Address:
dkuhlman@rexx.com
http://www.rexx.com/~dkuhlman
Revision: 1.0a
Date: July 12, 2005
Copyright: Copyright (c) 2005 Dave Kuhlman. All Rights Reserved. This software is subject to the provisions of the Zope Public License, Version 2.1 (ZPL): http://www.zope.org/Resources/License/

Abstract

This document contains notes on the process of customizing an installed CPS site. We discuss the use of CPSSkins, themes, portlets, roles, workflows, custom document types (through CPSTypeMaker and CPSSchemas), and the installation of some common products.

Contents

1   Introduction

This document is an in-progress set of notes on how to install and customize a CPS site. My intension is to continue adding to these notes to the point where they explain something of what we need to know in order to develop Web applications on top of CPS.

This document describes work done with:

2   Installing CPS

Here is what I've done:

  1. Install Zope-2.7.5-final -- I use:

    ./configure --prefix=../Zope-2.7.5-home --with-python=/usr/bin/python
    make
    make install
    
  2. Create a Zope instance -- In your Zope installation (Zope-2.7.5-home, in my case), run:

    bin/mkzopeinstance.py
    
  3. Configure your Zope instance. Do this by editing myinstance/etc/zope.conf. For example, because I often run, work with, and test several Zope instances concurrently, I usually change the port-base directive.

  4. Test your Zope instance -- Make sure that you can connect to the ZMI (Zope management interface) of your Zope instance with your Web browser.

  5. Download CPS-3.3.3.tar.gz. Unroll it in the Products directory of your Zope instance. You should then have things like the following:

    myinstance/Products/CPSDocument/
    myinstance/Products/CPSSkins/
    [etc]
    
  6. Restart Zope.

  7. Create a CPS site -- In the ZMI, click on Root Folder, then add a CPSDefault Site.

  8. Connect to your new site -- If your port is 8081 (if you set port-base to 1) and the name of your new site is mycpssite, with your Web browser, visit:

    http://localhost:8081/mycpssite
    

3   Add Some Products

CPS-3.3.3 includes several useful Products that are not automatically installed. There are several ways that you can install these Products:

4   Configure the Portal/Site

You can configure several features of the site by logging on as manager, then clicking on Reconfigure portal. Here are some of the features that you can configure:

5   Create a Custom Document Type

CPSTypeMaker and CPSSchemas enable you to create and define custom document types. Users of your CPS site will then be able to create instances of your document type.

Use the Type Maker tool. In order to do this, you will need CPSTypeMaker and CPSSchemas. If you do not have CPSTypeMaker and CPSSchemas installed, you will need to install them. For example, you can use portal_quickinstaller in the ZMI.

5.1   What CPSTypeMaker does

When you install CPSTypeMaker, a link (Document type management, Gérer les types de documents) is added to Portal actions box of the manager's interface to the CPS portal. Clicking on this link enables the user to create and edit new document types. Editing, in this context, means adding and defining fields and widgets.

CPSTypeMaker enables you to do what you would have

5.2   Installing TypeMakerTool

TypeMakerTool is included in the CPS distribution.

To install TypeMakerTool in your portal, do the following: Within in the ZMI, click on portal_quickinstaller. Select CPSSchemas and CPSTypeMaker under installable products, then click on Install.

Or, create an ExternalMethod in your portal which points to CPSTypeMaker.install, function install. Then click on the Test tab in that ExternalMethod.

5.3   Using TypeMakerTool

In order to use CPSTypeMaker, you must be logged on as the manager of your portal.

To create a new document type, do the following:

  1. Click on Document type management/Gérer les types de documents in Portal Actions. Then follow these steps:
  2. Click on New, then describe your new type.
  3. Edit the new type and add items/widgets -- Click on Edit Type under Object actions. Add a field/widget by (1) entering a name, (2) selecting a widget type, and (3) clicking on Add.
  4. Edit the layout of the new type -- You must add your fields/widgets to the layout in order for them to show up in instances of your document type. Click on Edit Layout under Object actions. Click on the left-arrow next to a widgetAdd your fields to the layout.
  5. Configure each of the widgets in your document type -- Click on the tool icon (it looks like a wrench) either in the Edit Type or the Edit Layout interface.

Questions:

  • How do we specify the operation to be performed (1) when an instance is edited and save?
  • How do we specify the operation to be performed (1) when an instance is delivered to the end user?
  • In general, how do we add behavior to our new type.
  • Or, how do we convert a new document type created and defined with CPSTypeMaker into a Zope/CPS Product?

5.4   Configuring CPSTypeMaker

Click on Type Maker General configuration in Object actions or Configuration générale de Type Maker in Actions de l'objet.

Here are a few notes on configuration items:

  • Id prefix for TypeMaker types -- This prefix is attached to the names of objects that CPSTypeMaker creates within portal_schemas, portal_types, and portal_layouts.
  • Prefix for layouts zpt -- ?

5.5   Descriptions of some widget types

CPSTypeMaker is basically a GUI withing a CPS portal that enables the user to define a document type built on CPSSchemas. In other words, CPSTypeMaker enables you to do through your CPS portal GUI what you could do within the ZMI using tools such as portal_types, portal_layouts, etc.

CPSTypeMaker enables you to define a document type by adding widgets of different types to your document type definition.

The remainder of this section describes some of the field/widget types that can be added to a document defined through CPSTypeMaker. These field/widget types are the same ones supported by CPSSchemas.

To configure any of the fields you have created, click on the tool symbol (it looks like a wrench, to me) next to the field.

5.5.1   Common properties

The following properties are common to all widget types. They are inherited from class CPSWidget in CPSSchemas.Widget.py.

Properties:

  • Label in view layout mode - This label will be displayed before the field in View mode. If you do not want to display a label, make this value empty.
  • Label in edit layout mode - This label will be displayed before the field in Edit mode, that is, when you are editing an instance of this document type.
  • CSS class for view -- This label is added as a class attribute to a surrounding div element when the widget is generated for view.

5.5.2   AttachedFile

Defined by class CPSAttachedFileWidget in module CPSSchemas/ExtendedWidgets.py which subclasses CPSFileWidget in module CPSSchemas/BasicWidgets.py.

Properties:

  • Deletable -- Specify yes if you want the user to be able to specify that no file is to be uploaded.

  • Maximum file size -- The maximum allowed size for uploaded files.

  • Allowed file suffixes -- If you want to restrict uploaded files to a set of file suffixes. Enter them one per line and include the period if approprite, for example:

    .zip
    .bz2
    .gz
    

5.5.3   Boolean

Defined by class CPSBooleanWidget in module CPSSchemas/BasicWidgets.py.

Properties:

  • False label and True label -- These values refer to labels defined in .po files in CPSSchemas. You will need to extend and modify CPSSchemas if you modify these.
  • `` Render format`` -- Specify whether you want the widget to be displayed in View mode as a checkbox, as radio buttons, or as a select list element.

5.5.4   Date

Defined by class CPSDateWidget in module CPSSchemas/BasicWidgets.py.

Properties:

  • View format -- These formats are the same as those used in the time module in the standard Python library. Note that use of the View format is not currently implemented.
  • View format empty -- Enter a string to be displayed if no date is entered.

5.5.5   DateTime

Defined by class CPSDateTimeWidget in module CPSSchemas/ExtendedWidgets.py.

Properties:

  • View format -- Specify a view format:
    • short -- example: 04/15/2005.
    • medium -- example: 04/15/2005 12:00 PM.
    • long -- example: 04/15/2005 02:15:00 AM.
  • Enabling the setting of time of the day -- Specify yes, if you want the user to be able to set the time (in addition to setting the date) in Edit mode.
  • default hour for time -- Enter the default hour.
  • default minutes for time -- Enter the default minutes.

5.5.6   Float

Defined by class CPSFloatWidget in module CPSSchemas/BasicWidgets.py.

Properties:

  • Value must be in range -- Specify whether you want content validated when the user saves the document.
  • Range minimum value -- The minimum range for validation.
  • Range maximum value -- The maximum range for validation.
  • Thousands separator -- For example, "," or ".".
  • Decimal separator -- For example, "." or ",".
  • Number of decimals -- Entry the number of decimals to be saved and to be displayed in View mode.

5.5.7   Image

Defined by class CPSFloatWidget in module CPSSchemas/BasicWidgets.py.

Properties:

  • Deletable -- Specify yes if you want the user to be able to specify that no file is to be uploaded.
  • Maximum file size -- Enter the maximum size file you want the user to be able to upload.
  • Display width -- Enter the width which you want the image to be resized in View mode. Enter zero for both width and height, if you do not want the image to be resized in View mode.
  • Display height -- Enter the height which you want the image to be resized in View mode. Enter zero for both width and height, if you do not want the image to be resized in View mode.
  • Enable to resize img to lower size -- Select Yes if you want to allow automatic resizing of the image.

5.5.8   Integer

Defined by class CPSIntWidget in module CPSSchemas/BasicWidgets.py.

Properties:

  • Value must be in range -- Specify whether you want content validated when the user saves the document.
  • Range minimum value -- The minimum range for validation.
  • Range maximum value -- The maximum range for validation.
  • Thousands separator -- For example, "," or ".".

5.5.9   Password

A password field. Provides some error checking on passwords, as well as hiding typed entries.

Defined by class CPSPasswordWidget in module CPSSchemas/BasicWidgets.py which subclasses CPSStringWidget in module CPSSchemas/BasicWidgets.py.

  • Display Width -- Enter the desired width of the entry field.
  • Maximum input width -- Enter the maximum number of characters allowed in a password.
  • Password widget to compare with -- ???
  • Checking at least one lower case [a-z] -- Specify Yes to perform a validation check for at least one lower case character when the document is saved.
  • Checking at least one upper case [A-Z] -- Specify Yes to perform a validation check for at least one upper case character when the document is saved.
  • Checking at least one digit [0-9] -- Specify Yes to perform a validation check for at least one numeric character when the document is saved.
  • Checking at least one extra char other than [a-zA-Z0-9] -- Specify Yes to perform a validation check for at least one non-alphanumeric character when the document is saved.
  • Checking minimum size -- Specify Yes to perform a validation check for a minimum length when the document is saved.

5.5.10   RichTextEditor

A RichTextEditor is like TextArea, but uses the RichText widget to edit text in Edit mode.

Defined by class CPSRichTextEditorWidget in module CPSSchemas/ExtendedWidgets.py.

Properties:

  • Width -- The width of the editor widget in Edit mode. Not currently implemented.
  • Height -- The height of the editor widget in Edit mode. Not currently implemented.

5.5.11   Select

Defined by class CPSSelectWidget in module CPSSchemas/BasicWidgets.py.

  • Vocabulary -- Enter the name of a vocabulary. A vocabulary is an item in the portal_vocabularies in your CPS site in the ZMI. This is a required entry; you may get errors if you omit it. To create Select widget with a custom set of labels and values, create a new object in the portal_vocabularies tool.
  • Is vocabulary translated on display -- If No, the selected label is displayed in View mode; if Yes, the item ID of the selected item is displayed in View mode.

5.5.12   String

Defined by class CPSStringWidget in module CPSSchemas/BasicWidgets.py.

Properties:

  • Display width -- Specify the character width of the entry field in Edit mode.
  • Maximum input width -- Specify the maximum number of characters that can be entered into the field.

5.5.13   TextArea

Defined by class CPSStringWidget in module CPSSchemas/BasicWidgets.py.

Properties:

  • Width -- Character width of the
  • Height -- Number of rows in the text area input box in Edit mode.
  • Render format -- The transformation used to render the content of the field. Possible values are:
    • text -- HTML special characters are escaped and br elements are added at the end of lines.
    • pre -- HTML special characters are escaped and the content is surrounded by a pre element.
    • stx -- The content is treated as structured text.
    • html -- The content is not transformed.

5.5.14   OrderedList

An OrderedList is like an UnorderedList, except that each item is prepended by a item number. It is rendered as an HTML <ol> element.

Defined by class CPSOrderedListWidget in module CPSSchemas/BasicWidgets.py.

  • Width -- Width of the widget in Edit mode.
  • Height -- Height of the widget in Edit mode.
  • Format for empty list -- Enter a string to be displayed when the list is empty.

5.5.15   UnorderedList

A list of items (strings) to be displayed. It is rendered as an HTML <ul> element.

Defined by class CPSUnorderedListWidget in module CPSSchemas/BasicWidgets.py.

  • Width -- Width of the widget in Edit mode.
  • Height -- Height of the widget in Edit mode.
  • Format for empty list -- Enter a string to be displayed when the list is empty.

6   Customize Existing (CPSSchemas) Document Types

You can customize existing CPS document types, in those that are implemented with and based on CPSSchemas. There are two very different ways to do this. The choice between these two methods depends on your needs:

6.1   Customizing in the ZMI

Existing document types are represented in your site which you can view in the ZMI. Here are some places that you can look.

6.1.1   portal_layouts

Mostly, this tool defines the appearance of each document type when it is edited or viewed (rendered).

After you click on portal_layouts, select a document type, then under the Widgets tab, click on the field to be customized. Here are some of the things you can customize:

  • Render format -- Suppose you want users to enter text that is delivered to end users without transformation (escaping HTML characters, of course).
    • text -- Deliver content without transformation (escaping HTML characters, of course).
    • stx -- Perform Zope Structured Text transformation. See http://www.zope.org/Documentation/Articles/STX for more information on Structured Text.
    • html -- The user will enter raw HTML.
  • Render position -- Gives the user some control over the position where the content is rendered.
  • What is user configurable -- For example, you can enable or disable the user's ability to specify the Render format.

7   Customize Look and Feel: CPSSkins

7.1   What CPSSkins does

CPSSkins enables you to customize the look of your CPS site. Through it you can customize the color and styles of objects on your page. You can also change the arrangement and location of objects on the page.

CPSSkins effectively separates (changes to) appearance from behaviour of your site.

7.3   A little bit of theory

Layouts portlets, boxes, slots, styles, and themes -- What are they?

CPSSkins separates two distinct roles:

  • Designer of themes
  • Administrator of portlets

And because of these two roles, there are two separate editors:

  • Theme editor -- Click on Portal Themes. Use this editor to manage the slots on the page and their contents. Also, use this editor to create color palates, area shapes, to be applied in the portlet editor.
  • Portlet editor -- Click on Manage portlets. Use this to manage the appearance of the contents of the slots. Do this by attaching styles (Area Shapes, Area Colors, etc) to the contents of slots.

And, to understand this, it is necessary to learn and distinguish the following concepts in the context of CPS3:

  • Portlet
  • Box
  • Layout
  • Style

7.4   Install CPSSkins

CPSSkins is included in the distribution of recent versions of CPS.

You may need to use portal_quickinstaller in the ZMI to install it in your portal.

7.5   Enter the CPSSkins editor

To enter CPSSkins, click on Portal Themes under Portal actions.

You can also access the portlet and themes editors through the keyboard:

  • Shift Alt _ (underscore) -- Enter the portlet manager.
  • Shift Alt * (asterisk) -- Enter the portlet editor.

7.6   Change the default skin

One of the existing skins may be just right for you or may be closer to what you want. In order to set a theme as the default, do either of the following:

  • In the Skins/themes editor, click on the pencil icon next to the theme name in the tab near the top of the page. Then select Set as default from the drop-down list.
  • Or, in the Skins/themes editor, click on Themes manager near the to of the page. Then use the radio buttons under Default theme to indicate your default theme, and then click on Modify.

Then click on Exit to return to your portal and view the selected theme.

You can do this repeatedly to try out different themes.

7.7   Create a new skin

If you are going to customize an existing theme, you are likely to want make a copy of that theme first. To do so, enter the Skins/Themes editor, then click on the pencil icon next to the name of the theme you want to copy in the tabs across the top of the page. Now, select Duplicate from the drop-down menu.

Perhaps, you want to rename your new theme. To do so, click on the pencil icon in the tab for your theme near the top of the page. (It is likely to have been added as a new tab at the left.) Select Edit from the drop-down menu. Now, in the pop-up editor window, change the name and click on Modify.

Next, you will want to set this as the theme to be used by your site, so click on the radio button under Default theme corresponding to your new site, then click on Modify.

Now that you have created a new theme with your name on it, you can make your changes to this copy, rather than to the original theme.

7.8   Customize the look of a (portal) box

You can change the look of each of the boxes in your theme. Here is how.

Enter the theme editor, then click on one of the boxes in your them. Now you can either click on Set styles or you can click on Edit and then click on the styles tab.

Next notice the various types of styles of the box that you can customize. These style types are:

  • Font color
  • Font shape
  • Area shape
  • Area color
  • Portal box shape
  • Portal box color
  • Tab style

For each of these style types, you have two alternatives:

  • Modify the existing style, or,
  • Create a new style and assign it the a specific box.

7.9   Modify an existing style

After clicking on the Style tab in the edit window for the box you wish to modify, click on the icon next to the style type that you want to change. You can now modify that existing style. But, notice that this style may be in use by other portal boxes as well. So, in a box at the top of the style edit window, you will be warned about this multiple use and there is a button/link that will enable you to create a copy of the style if you wish.

7.10   Creating a new style

We've already you are able to create a new style by copying an existing one when you attempt to edit the existing style. Now we'll create a new style from scratch.

To do so, click on the Styles button at the very top of the page. Now click on the style type for which you want to create a new style, for example Area shape or Area color. You will then see one of more existing styles of this type. Click on the create (plus) button to create and edit a new one. Or you can copy and paste (and rename, if you like) an existing style of this type.

Next, edit the style to get the appearance you want.

And, finally, return to WYSIWYG mode, click on the box you want to customize, select Set styles, and assign your new style to the box.

7.11   Customizing styles -- details

For details about customizing styles, see the CPSSkins book: CPSSkins a WYSIWYG Theme editor for CMF, CPS and Plone, which you can find here: http://www.medic.chalmers.se/~jmo/CPS/.

7.12   Portlet boxes

This section provides more help with using specific types of portlets.

7.12.1   Action Box Templet

A toolbar containing action buttons with icons. Here are some of the kinds of action buttons that you can include in the box:

  • global:configThemes -- Allows the site manager to enter the CPSSkins editor.
  • global:configPortal -- Allows the site manager to enter the portal configuration screen. Also see: Configure the Portal/Site.
  • user:login -- Includes a login button.
  • user:logout -- Includes a logout button.
  • user:join -- Includes a join button, if the portal has been configured to all new members to join. See: Configure the Portal/Site.
  • global:boxes -- Adds a button to allow managing the boxes that make up the portal's pages.
  • global:directories -- Provides a link to a screen to manage members, groups, and roles.

7.12.3   Calendar Templet

A calendar with monthly events

7.12.4   Cell Block

A Cell Block allows to display several Templets horizontally inside a Page Block.

7.12.5   Collapsible Menu Templet

A collapsible menu that shows folder items

7.12.6   Document Info Templet

Information about the current document, i.e. its title, the date of last modification, the name of the creator, etc.

7.12.7   Flash Box Templet

A Macromedia Flash(tm) box with a caption

7.12.8   Image Box Templet

A box that displays an image. The icon can have a link and a caption.

Bring up the editor to specify the following:

  • A caption to be displayed along with the icon.
  • A Web address (URL) -- When the user clicks on the icon, the browser will visit this address.
  • An internal address -- If you check the Use internal link? checkbox (and then press Modify), you can specify one of a set of predefined internal addresses. These link to various sites within your CPS Web site.

7.12.9   Language Templet

A language selector

7.12.10   Main Content Templet

The main content area where documents are displayed

7.12.11   Portal Box Group Templet

A slot containing a group of boxes or portlets.

7.12.12   Portal Box Templet

A generic box that displays actions, folders, an about box, a login box, an info box, etc.

7.12.13   Portal Tab Templet

Horizontal tabs displaying folders, actions, etc.

7.12.14   Portlet Box Templet

A box that contains a portlet.

7.12.15   Search Box Templet

A box with an input field to search the site.

Bring up the editor to specify the following:

  • Advanced or Compact style -- Advanced style will add a link that brings up a page with additional search features and options.

7.12.16   Theme Chooser Templet

A theme selector for visitors (cookies must be enabled)

7.12.17   Text Box Templet

A box that displays plain text or formatted HTML.

Bring up the editor to specify the following:

7.13   Questions about portlets

[TBA]

Questions:

  • When I create a Portal Box Group Templet, I can give it a slot name things like "right", "left", "bottom", "closed", etc. What do these mean? Is this the only way I can give content to a Portal Box Group Templet?
  • How do put content into a portlet? What's the theory here?
  • When I give a Portal Box Group Templet and give it a slot name "right", it has Object Actions and Folder Actions repeated twice. What am I doing wrong?

8   Customize Look and Feel: Working with CPSSkins

This section gives guidance on how to work with CPSSkins editor and how to define new themes.

Here are some strategies:

8.1   Copy an existing theme

First find a theme that has a look (and capabilities) that are reasonably close to what you want. CPSSkins comes with several built-in themes. (1) Enter the portal themes editor. (2) Set a theme as a default, either (a) by clicking on the "Themes manager" button and then using the radio buttons or (b) by clicking on the tool icon in the tab for that theme near the top of the page and then selecting "Set as default".

Next, make a copy of that theme. You can do this by clicking on the tool icon in the tab for the theme you want to duplicate and then selecting "Duplicate" from the drop down menu.

You can now set your new theme as the default and begin customizing it.

8.2   Customizing your new theme

Here are some of the things that you can do:

  1. Change the name and information about your theme -- Click on the tool icon in the tab for your theme and select "Edit" from the drop down menu. Change the theme name in the "General" tab. And, change information about the theme in the "About" tab.
  2. Study your new (copied) theme. To do so, you will want to go back and forth between the themes editor and your actually portal a number of times. When you
  3. Move something to a different location on the page --
  1. Customizing a color or style --
  2. Removing capabilites --
  3. Adding capabilities -- You can also find out what capabilities are not present in the page by ...

8.3   Import and (copy and) modify an existing theme.

Here is how you can import a theme:

  1. First obtain the theme. There are several places where you may find and download themes that fit your needs, for example:
  2. Next, enter the themes editor by clicking on "Portal Themes".
  3. Now, click on the "Themes manager" button.
  4. Toward the bottom of the page, you will be able to browser for and import a theme.
  5. And, now you can duplicate this imported theme; rename it, if you wish; and begin to customize it.

8.4   Create a new (empty) theme and build from scratch.

First create your new (mostly empty) theme. Do this in either of the following ways:

  • Click on the plus ("+") sign at the right of the line of tabs of themes. Or,
  • Click on the "Themes manager" button, then click on the "Add a theme" button.

Then, click on the tool icon next to the new theme's tab, select "Edit", change the name of your new theme, and proceed to customize it.

Here is guidance for building your new theme:

  • Lay out your page using Page Blocks. You can lay out your page by creating page blocks to define horizontal rows. Each of these page blocks can be devided into multiple columns and each column can be given a percentage of the width of the page. I find that it's easiest to do this layout in "Layout mode" or "Mixed mode", rather than "WYSIWYG mode".
  • Use portlets as much as possible. When you create a "Portal box group templet", you can edit the templet and specify one of the existing slot types for each of these templetes. Each of the different slot types provides packaged behavior for that slot.

9   Customize Behavior: Workflow and Roles

9.1   Using built-in workflows

Understanding workflows means understanding roles. And understanding roles means understanding groups.

9.1.1   Groups

A role can be assigned to an individual, i.e. someone who has joined a site. But, a role can also be assigned to a group, in which case, all members of that group will have that role.

In CPS, roles are associated with a document type and a location. So, if you or a group that you are a member of

9.3   A few hints and suggestions

Here are a few places to look for information:

  • Several short documents in Products/DCWorkflow/doc in your CPS distribution, in particular: basics.stx and howto.stx.

9.4   Creating a new workflow

The easiest way is to find an existing workflow that is similar to what you need, then copy it.

Look in portal_workflow, then click on the Contents tab. When you find a workflow that has some of the capabilities that you need, use the Copy, Paste, and Rename buttons at the bottom of the page to create your workflow. Now you can start editing states, transitions, variables, permissions, etc.

How do you tell if an existing workflow is similar to the one you want to create? Look at the states (under the States tab) and the transistions (under the Transitions tab). Try to determine if there is an similarity (or isomorphism) with the workflow you want to create.

9.5   Specifying the workflow for your document type

You may need to do this for both sections and workspaces.

In the ZMI, inside your site, click on workspaces, then select .cps_workflow_configuration. specify the workflow that your type should be controlled by within workspaces.

Do something similar inside sections.

10   Miscellaneous Hints and Suggestions

10.2   Set the default view for a folder

Suppose that when an end user visits a specific folder in you site, you want a particular particular document to be automatically displayed. Outside of the CPS/Zope environments, you would name that document index.html, or something similar. Within CPS, this is a little more complex, in part because CPS makes this customizable. First you need to find out what ID is used for the default view of a folder.

To discover what ID is used for the default view of a folder (or any other portal type), do the following:

  1. In the ZMI, within your site, click on portal_types.
  2. Then click on (the object) Folder.
  3. Now click on the Actions tab.
  4. Now look for the action whose ID is view. That action will specify the URL that CPS will use as the default view for the Folder type.
  5. For a Folder object, that URL probably ends in folder_view. If so, your final step is to change the ID of the document in that folder to folder_view.

But, there is a catch. When I tried to change the document ID from within the site's Web interface, I found that CPS changes underscores to dashes. If the same thing happends to you, you will need to change the ID in the ZMI. For example, if the document is in the user's workspace, you can find the document object under the user's name in workspaces.members.