2.1 Groupings Table

Introduction

The Groupings table is the table that defines the roadmap to the whole target site.

Definition

The Groupings table must have the following structure, though text field lengths may be larger or smaller (as long as the fields exist).

CREATE TABLE `groupings` (
`filename` varchar(100) NOT NULL,
`description` varchar(20000) NOT NULL,
`meta_description` varchar(3000) NOT NULL,
`created_on` timestamp NOT NULL default '0000-00-00 00:00:00',
`modified_on` timestamp NOT NULL default '0000-00-00 00:00:00' on update CURRE NT_TIMESTAMP,
`id` int(11) NOT NULL auto_increment,
`tablename` varchar(100) default NULL,
`directory` varchar(100) NOT NULL COMMENT ' ',
`title` varchar(100) NOT NULL COMMENT ' ',
`generate_detail` char(1) default NULL,
`browser_title` varchar(100) default NULL COMMENT ' ',
`meta_keywords` varchar(500) default NULL,
`model` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;

Description

Groupings define which tables pages will be generated. There are several ways this works, and depending on use certain fiels in the Grouping record may be used or not used:

  • Detail pages, as generated off a table in the database. To do this, we create a groupings record with generate_detail = "Y", and the name of the data table to use in the field tablename. Detail pages will be generated in a subdirectory as specified in directory. Generation is basically the translation of the data in the record in the data table, using the Title field for page title and Description becomes the page body. The model file used is the one specified in model, if specified; if not the standard model file is used as set up in the Compendium configuration. Meta tags will be filled with the page title.
  • Summary pages : that are basically the sort of home page for detail pages. E.g. if you have a site that does recipes, the actual recipes would be in a table called recipes, and the page that refers to all recipes would be the index page. The summary page is generated by default along with detail pages, if a filename is given. If filename is empty there is no summary page. However, it is possible to generate a summary page without detail pages! To do that we simply leave generate_detail empty.
    Of course, if there are no detail pages, then one might wonder where the detail actually is listed - typically that would be in the summary page itself, perhaps as a bulleted list. As an example see the following Fortunes page, which is generated off a table called fortunes, and without detail pages. The built-in tag to generate this is the LIST tag.
    Meta_description is used to fill the meta description tag in the page header; Meta_keywords is used to fill the meta keywords section in the HTML page header. Browser_title sets the page title in the browser window.
  • Ad-Hoc pages are similar to Summary pages, but are not linked to data tables. These are made just like Summary pages, but we leave the tablename field empty. This is used to make things like FAQ pages (unless you want to put the FAQs in a table of course), a search page, a site map page etc.