Class Administation
Classes are the fundamental building block for Catalog. While you do not have to create any classes, they do give you the ability to extend or customize the attributes beyond what is already provided for an item in Catalog.
Classes List
Selecting Classes from the Linkbar will present you with a list of the classes defined in Catalog.
Toolbar
In conjuction with selecting one or more checkboxes in the list, the Toolbar provides the following functions:
- Publish the selected class(es).
- Unpublish the selected class(es).
- Edit a selected class.
- Add a new class
- Delete the selected class(es). Please note that in order to delete, you must remove all catalog items from the class(es).
Filters
You can filter the list by the following:
- Part of a string in the title of a class.
- The published state of the classes.
List Interaction
You can interact with the list of classes in the following ways:
- Click the linked column headers to change the sort order of the list and to reverse the sort direction.
- In the Title column, click the first link to edit the class. Click the second Class Info link to see a summary of the class (see image below).
- In the Published column, click the icons to toggle between published and unpublished states.
- In the Order column, click the up and down arrow icons to weight the ordering in different directions.
- Use the list pagination features as you would for any other component.
Related Information
The table also shows how many items have been created in each class.
Adding or Editing a Class
Toolbar
The Toolbar provides the following functions:
- Save the current item but as a new copy of the original item (Save To Copy). Any change made are saved with the new item, not the original.
- Save the current item and then returns you to add another (Save & New).
- Save the current item and return to the list.
- Apply the changes made to the current item and return to the same page to continue edits.
- Cancel the edits without saving and return to the list.
Main Page
The add/edit page is divided into two main areas: a Title Block and a tabbed section.
The Title Block allows you to manage the following fields:
- Title - the title for the class.
General Tab
This tab allows you to manage the following fields:
- Description - the body text or desciption (note, in the screenshot the WYSiWYG editor buttons are collapsed for the sake of clarity).
- Published - allows you to set the item to a published or unpublished state.
- Order - the weighted order for the item. Negative numbers rise to the top of lists, and positive numbers sink to the bottom. The order values do not need to be sequential.
- Item Comments - allows you to provide some notes or comments about the class.
Class Attributes Tab
Catalog has two types of attributes: Standard Attributes and Optional Attributes.
Standard Attributes
Standard Attributes are defined using XML markup. The Standard Attributes Field has a tool that allows you to paste snippets of XML for various field types. There are two types of snippet that you can insert.
To insert a regular field select one from the Add Field list and click the [+] button.
The follow list outlines the most common types of custom field that you might use. In all cases, you need to replace NAME with a unqiue value that describes the field (for example, phone, address, zip_code), and replace LABEL with a suitable label for the field that will display in the article edit form.
Text Box
<field name="NAME" type="text" class="inputbox" label="LABEL" default="" description="" />
Text Box with Calendar
<field name="NAME" type="text_calendar" class="inputbox" label="LABEL" default="now" description="Format YYYY-MM-DD" format="%Y-%m-%d" />
Text Area
<field name="NAME" type="textarea" class="inputbox" label="LABEL" default="" rows="3" cols="30" description="" />
Text Area Editor
<field name="NAME" type="textarea_editor" class="inputbox" label="LABEL" default="" rows="3" cols="30" description="" />
Select List
<field name="NAME" type="list" class="inputbox" label="LABEL" default="" description=""> <option value="">None</option> <option value="red">Red</option> <option value="green">Green</option> </field>
Radio List
<field name="NAME" type="radio" class="inputbox" label="LABEL" default="1" description=""> <option value="0">No</option> <option value="1">Yes</option> </field>
The following example shows a simple case where you might want to define more contact information with a class:
<field name="contact_name" type="text" class="inputbox" label="Contact Name" default="" description="The contact details relating to the article" /> <field name="contact_details" type="textarea" class="inputbox" label="Contact Details" default="" rows="3" cols="30" description="Extended contact details for the person" /> <field name="contact_type" type="list" class="inputbox" label="Contact Type" default="When best to make contact" description="When to contact the person"> <option value="bh">Business Hours</option> <option value="ah">After Hours</option> <option value="we">Weekends Only</option> </field>
To insert a taxonomy list (which you define in the List Name and List Items sections), select one from the Add Taxon Type list and click the [+] button. This is a specially formatted snippet of XML as shown in the following example:
<field name="taxontypeid_2" type="list_taxa" type_id="2" class="inputbox" label="Business Directory Counties" default="0" />
The name attribute of the field must be in the form "taxontypeid_#" where # is replaced with the record ID of the taxon type (called List Name on the Linkbar).
When you save the class, these fields will appear in one of the tabs of the catalog item (or node) edit form.
There are additional XML attributes that you can add to a field.
default_access
This attribute sets the access default access level for the attribute. It takes an integer being "0" (public) or "1" (registered). Public access is assumed unless specified otherwise.
default_access="1" />
required
This attribute is a filter setting that ensures that a value has been provided for the attribute. It takes the value "true". False is assumed unless this attribute is set.
required="true" />
Decorators
A number of field decorators are available to format special fields like email and URL's.
The following code added to the class field definition will decorate the field at an email:
decorator="email" />
The following code added to the class field definition will decorate the field at an URL and open it in a new window:
decorator="url" decorator_options="target="_blank"" />
Please note in XML can't use quotes in content and must convert them either to " for double quotes or ' for single quotes.
Parameters Tab
This tab you to manage the following Enabled Features for the class:
- Support Abstract - show or hide the Abstract editor field when editing an item.
- Support Standard Attributes - show or hide the Standard Attributes field when editing an item.
- Support Optional Attributes - show or hide the Optional Attributes field when editing an item (typically set to hide).
- Support Media - show or hide the Media field when editing an item.
- Support Maps - show or hide the Mapping fields when editing an item.
- Support Ecommerce - show or hide the Ecommerce related fields when editing an item.
- Enable Date Minutes - Whether or not to support minutes in dates. If no, minutes will be trimmed from dates.
The "Support X" parameters allow you to reduce the "clutter" when editting the items in a particular class. For example, if your class does not need to support Ecommerce variables, then you can remove these from the edit screen so as to reduce potential confusion for the data entry operator.
This tab you to manage the following Defaults for the class:
- Start Date - An optional default start date. Use "now" to set the date to the actual date at the time of creation.
- Finish Date - An optional default finish date. Use "now" to set the date to the actual date at the time of creation.
Additional Comments
Classes are not mandatory. The basic catalog item is already quite rich with built-in fields for such things as mapping, media object and E-commerce. Even if your catalog has only one "type" of thing, it is a good idea to create a class for it even if there are no custom fields.





No problem, support subscriptions give you access to one-on-one help from real Joomla experts.