Members

Note: You can use your Sitellite.org account here and vice versa.

Username

Password

Remember Login

Forgot your password?

Not a member? Click here to register

New Collection

Home Page | All Pages | Recently Revised | Authors | Feeds |

Collections are akin to data types in Sitellite. These include WebPages, WebFiles, News Stories, Sidebars, and many more. You can define as many collections as you need.

Collections can be made editable via Sitellite's WebView (this is done automatically for the Sidebars collection automatically, and semi-automatically with the cms/buttons box for Web Pages). Collections also appear as a list under the top-left pane in the ControlPanel.

Collections are defined in IniFiles that live in the inc/app/cms/conf/collections folder. They contain several types of INI blocks:

[Collection]

First, there's the main [Collection] block. This contains basic info about the collection itself, including:

  • name - The name of the collection. For collections stored in the database, this needs to match the table name.
  • display - The name of the collection, as displayed to users.
  • singular - The name of the collection in singular form. Ie. if display is "Web Pages" singular would be "Web Page".
  • icon - An icon to use to display the collection in the ControlPanel.
  • key_field - The primary key field in the data source.
  • title_field - The field to use as a title from the data source.
  • summary_field - This field will be indexed by SiteSearch as a description of the item.
  • keywords_field - For SiteSearch to index for keywords.
  • body_field - For SiteSearch to index for the item's main body.
  • is_versioned - This is a yes or no value determining whether the collection has versioning capabilities or not.

[Source] and [Store]

These usually only have a single value in them, which is:

  • name - The driver name. Drivers live in the inc/app/cms/lib/versioning/(source|store) folders. If there is no versioning for your collection, set the [Store] name value to Blank.

After this there can be one or more of the following block types:

[browse:field_name]

These are the list of fields that should display as columns in the browse list for your collection in the ControlPanel.

[facet:field_name]

These are the fields that should have facets (AKA "Search Parameters") in the browse list. Includes the followig elements:

  • display - the title displayed in the list header
  • type - MailForm widget types (eg. text, select)
  • values - w/select fields, accepts an associative array containing values. The collection will be queried for these values and sitellite will append all matches to the values in the select (eg. Approved(0))

[hint:field_name]

These configure how fields are rendered in the Add and Edit forms. They are essentially MailForm widget definitions.

Please note that if the add or edit values are set in the [Collection] block, which point to custom Add and Edit handlers, the [hint:field_name] blocks become unnecessary and will be ignored.

Revision from August 1, 2007 1:15 PM by lux

Forward in time (2 more) | Back in time (3 more) | See current | See changes | Linked from: Collections, Collection Definition Files