Personal tools

Managing the site: Using the "Topic" content type to generate dynamic lists of content

The system includes a flexible means of generating dynamic content lists based on criteria you specify. This document provides an introduction for the Topic content type and how to use it.

The Topic content type (see "Topic" on the "add new item" list), is a flexible way to generate lists of content dynamically. A topic is essentially a set of search criteria that behaves like a piece of content. This content type is used in the CPSR site for the Home page, the Issues folders (for the news and other files lists), and the Recent news page.

When you add a topic content object, you will need to provide information for the content and its functioning. The two fundamental parts of a topic include:

  • On the "edit" screen: Basic content information (short name, Title, description, which work the same as any other content type), plus the option to limit the number of pieces of content to list. To limit the number of displayed objects, check the box and choose the number.
  • The "criteria". The topic is a set of search criteria that determine what content to display. Use this interface to add/edit criteria and to set the ordering criteria.

Criteria for topics

Before you set any criteria, think about what you want to have happen. It is helpful to make notes about: what kind of content you want to display, what the characteristics of the content are (where it is stored, if it has particular keywords or authors or other elements), and how you would like the content to display. Once you have determined that, you can set up a topic to implement the changes.

A suggestion for setting up topics inlcudes two pieces: publishing rules and locating the content.

Respect publishing rules

Consider adding a first criteria to limit the displayed objects to those that are published. This ensures that the topic only displays what has been approved by site managers for publishing. To do so (from the "criteria" screen:

  • Find the "Add new search criteria" box.
  • In the "Field name" list, select "review_state" from the list of options.
  • In the "Criteria type" list, select "exact text value"
  • Click "Add".
  • When you see that the criteria has added at the top of the page (and the page reloaded), write "published" into the box for the criteria Value.
  • Click "Save"

Criteria for finding the content

Use the set of criteria necessary to identify the content in the system (examples below).  Examples of common criteria include: keywords, path, and content type.  All of these are done from the "criteria" view. On this page, find the "add new search criteria" box to do the following.

To add a keyword criteria:

  • In the "Field name" list, select "subject" from the list of options.
  • In the "Criteria type" list, select "exact text value"
  • Click "Add".
  • When you see that the criteria has added at the top of the page (and the page reloaded), write the keyword into the box for the criteria Value exactly as it appears on the keyword list (visible from the "properties" view).  Note that for Issues, the keywords are of the form: "Issue:privacy and civil liberties". The leading "Issues:" is necessary.
  • Click "Save"
To add a path (URL/location) criteria:
  • In the "Field name" list, select "path" from the list of options.
  • In the "Criteria type" list, select "exact text value" (for one single possible path/URL) or "logical AND or OR list of values".
  • Click "Add".
  • When you see that the criteria has added at the top of the page (and the page reloaded), write the path into the box for the criteria Value. The format is from the root of the Zope instance (NOT the web site). For the CPSR site, the format is thus: /cpsr/news/ for the news folder.
  • Click "Save"
To add a content type criteria:
  • In the "Field name" list, select "portal_type" from the list of options.
  • In the "Criteria type" list, select "portal types values"
  • Click "Add".
  • When you see the criteria added in the top of the page, select the types that you want from the list. Hold down the control key to select multiple types. Note that for the common content types (link, news, file, etc) there are two instances of each type: one with "CMF" before the name and one without - for example CMFEvent and Event should both be selected. Note 2: for "web pages" select Document and CMFDocument. 
  • Click "Save".


For more on Topics, please see this advanced tutorial .




Created by cjohnson
Last modified January 31, 2005 09:07 PM
Announcements

Sign up for CPSR announcements emails

Chapters

International Chapters -

> Canada
> Japan
> Peru
> Spain
          more...

USA Chapters -

> Chicago, IL
> Pittsburgh, PA
> San Francisco Bay Area
> Seattle, WA
more...
Why did you join CPSR?

I like the health insurance opportunity.