Chapter 4. Content Types

4.1. Overview
4.2. Managing Content Types
4.3. Adding Content Types
4.4. Editing Content Types
4.5. Deleting Content Types
4.6. Specifying Content Type Elements
4.7. The Image Gallery Content Type

4.1. Overview

A content type provides structure to your content. A simple content entry might have a title and a body. Instead of relying on visual styles or layout to distinguish where the title ends and the body begins, content types use elements to identify the title and body as individual components of content. Such structure helps ensure that your content is composed and displayed consistently.

Perforce Chronicle provides a set of basic content types for adding pages, files, images and so on. You can create or modify content types to fit your content's requirements from the simple to the complex. Also provided is a library of elements to help you compose new content types. These include text, date, editor, imageFile. Custom modules can provide additional elements. Each element you use in content can be configured with a label and optional features such as:

  • Filters: these can modify user-supplied information to remove undesirable content. For example, a filter could remove surrounding whitespace, remove HTML tags, or convert special characters into HTML entities.
  • Validators: these help users to enter information in the format you expect. For example, a phone number element might restrict users to entering numbers, periods, and dashes, where the numbers must be in two groups of three followed by a group of four.

Theme designers can create view scripts, which specify how a specific content type is to be displayed. Please see Section 11.4, “View Scripts” for more details.

Perforce Chronicle - Release: 2012.2/486814