Quick Start
Catalog is very powerful and flexible, but setting up for the first time might be a little overwhelming because of all of the features and customization available to you. It is certainly possible to start creating catalog items without doing anything else. The basic item has many built-in attribute such as geo-referencing coordinates, some e-commerce values, and so on. However, most catalogs will require one or more types of item that have individual and possibly unique attributes.
The difference between Classes and Categories
A Class is a way to describe things with unique attributes. A Class may define things at a high level, for example "Animals", "Clothes" or "Books"; or a Class may define objects at a much lower level, such as "Cameras", "MP3 Players" or "DVD's". A Class could also define non-material things such as "Job Vacancies", "Property Listing" or "Joomla! Extension". To what level you define things really depends on the data that you are trying to represent.
So, if a Class describes a thing, then Categories are used to group them into sets. One way to look at the difference is that a Class is something you want to display to your visitor, and Categories are a ways for your visitor to navigate down to the thing they are looking for.
The line between Classes and Categories can shift depending on your data.
Creating a Class
Select "Classes" from the Link Bar and then click New in the Toolbar. Give you class a title (we'll use "Book" for this example). Pressing tab will automatically suggest an alias for the class.
Custom attributes are added to your class by using XML. The attribute editor has two select lists to help you build the XML. We'll cover the Taxon Type soon. For now we'll just look at creating custom fields.
Select Text from the select list and then click the [+] button next to it. This inserts a snippet of XML. There are two things we must change in the snippet. You must change the value of the "name" and the "label". For our book we want to show the publishing year so we will change the "name" value to "year" and the label value to "Year" like so:
<field name="year" type="text" class="inputbox" label="Year" default="" />
The class specifies the CSS style by which the text box will be displayed in our edit form. You can also define a default value. If many of our books where published in 2007 then we could set this as the default value.
Add a few more fields if you need them, then save your class.
Setting up Categories
Let's move to Categories. Click on Categories in the Link Bar. There is only one trick to remember with categories. You must keep the ROOT category the comes with Catalog and the construct your category tree under it.
Categories has a tool for creating categories quickly. First, select the ROOT category. Now type a few category names in the Quick Add list box putting each category title on a new line. In this example we'll type in:
Drama History Plays Science Fiction
Click process. The page should refresh with you new categories in the list, all slightly indented under the ROOT category. Let's create a second level. In our example we'll click the checkbox next to Plays and in the Quick Add textbox we'll type in:
Shakespeare T. S. Elliot
Clicking Add again, the list will come back with our new categories indented slightly further under Plays.
Creating Items
We are now ready to create an item. Select Catalog Items from the Link Bar.
Just above the table (which is probably empty if this is your first time here), there is a select list for the class. Change the value to the class you created. If you don't do this, when you create a new item it will assume that you don't want to assign a class to it.
Click New in the Toolbar. Enter a Title and then press tab to auto-create the Alias. Below the title block you'll see a tabbed area. On the first tab you can enter some summary text for your item, and probably a detailed description in the body field. To the side you'll see the list of categories (if you created them). You can put your item in more than one category by selecting the names while holding the control key at the same time.
Now click on the Attributes Tab. If you added some attributes to your Class you will see form fields for them.
Take a look around some of the other tabs and then save when you are happy with your data. Create a few more items as you require them.
Displaying the Catalog Items
The last step we will do is add a menu item to display a list of items. Go to one of your menus and then click New in the Toolbar. When the Item Type tree present itself, select "Catalog". You will now have a choose from quite a number of views. For this exercise choose "Default Nodes List" under "Nodes". When you do this, the typical edit form for the menu item will show up. In the Basic Parameters, pick your Class from the select list. You might also like to choose one of the order options.
Now save your menu item and then turn to the frontend of your site. Click on the new menu item when you have refreshed your site. You should see a list of your items. Clicking the linked title will take you to the item page where you will also see the custom attributes you may have entered for your item.
Using Taxonomy
Taxonomy is just a fancy term for how we name or classify things. Catalog comes with a simple yet powerful taxonomy system wherein you can design your own custom lists of attributes. For our book, we want to add a custom field for the type of cover. There are only two types we want to worry about: "hard cover" and "soft cover". Now, over time we've had trouble with typist mis-spelling entries so rather than having two types of covers, we get variations on a theme ("hrd cvr", "hard", "soft", and so on). Not good for data consistency. Catalog helps you out by allowing you to create lists.
Back in the Administrator, select List Names from the Linkbar. List Names has the same Quick Add feature that we used for the Categories. We'll put "Book Cover" in the Quick Add box and click Add.
Now select List Items from the Linkbar. We have a Quick Add box here as well, so pick a Type from the select list above the list table (in our case it will be "Book Cover"), then we'll add the entries to Quick Add box:
Soft Cover Hard Cover
Now click Add. We've set up our first list. Now we go back to our class to add this list as a custom attribute. Select Classes from Linkbar and then we'll edit the class we created. Click on the Attributes Tab. The Taxon Type list will now have Book Cover as an option. We'll select that and click the [+] button next to it. This adds the required XML to display the list at the end of the XML edit field. There is generally no need to change as the label is automatically provided for you.
Save the class and go back to Catalog Items. We'll edit one of our books and if we click on the Attributes Tab we can see that we have a select list for the type of cover the book should have.
No problem, support subscriptions give you access to one-on-one help from real Joomla experts.