top of page

Managing Categories

About Categories

  • You can organise your data into Categories so that your publication can be sorted into groupings.

  • You can set up a hierarchy of Categories on any number of levels

  • Each record can go into any number of Categories

  • When you publish your data, the Categories can be sorted by name, number, or a custom Sort Field

  • Category headings can be set as text or images

Planning your Categories

Think about how you want to organise your data. Let's look at a typical example: a product catalogue. You want to have main section headings, with sub-sections within each main section, and perhaps sub-sub-sections under the sub-sections. Something like this:

Top Level    Level 2        Level 3

Clothing

Mens

Shirts

Suits

Ties

Womens

Dresses

Lingerie

Kids

Playwear

Schoolwear

Food

Fresh

Frozen

We've got three levels in our category hierarchy. You can have any number of levels.

Adding Categories

Adding a Top-Level Category
  1. Select the Admin tab

  2. Expand the Categories topic on the left of the window

  3. Right-click (Windows) or Ctrl-click (Mac) anywhere on the category list and choose Add a top-level Category from the contextual menu.

Add a Category

You'll then see the Category Properties dialog (see below).

Adding a Sub-Category

To add a sub-category under an existing Category (either a top-level, or existing sub-category):

  1. Select the Category that you want to add a sub-category to

  2. Right-click/Ctrl-click on the category name

  3. Choose Add a subcategory from the pop-up contextual menu

You'll then see the Category Properties form.

Category Properties

Category Properties
Details Tab
Category Name

Enter a name for the new Category. Category Names do not have to be unique. For example, you might have "Shoes" as a subcategory under all of Mens, Womens, and Kids.

Number

CatBase will create a unique number for each new Category. Category numbers must be unique within the Database Project. You can change the number, but it must be unique!

Parent Category Name and Parent Number

When you add subcategories, their "parent" category name and number will be shown here. For a top-level Category, these fields will be empty.

Picture Name

When your data is published, you can publish a picture for each Category heading. To select a picture, click the Choose button.

Sort Field

Categories can be sorted on their Name, Number, or Sort Field when the data is published. If you want to sort them in a custom order, enter something into the Sort Field and then select Sort Field for sorting the Categories in your Publishing Stylesheet. This is an alphanumeric field, so if you want to enter numbers here, don't just enter "1", "2", "3" etc - enter them as "001", "002", "003", etc. to ensure that they are sorted correctly.

Master Page

For use with QuarkXpress and Adobe InDesign. If you want to apply a specific Master Page to the data in this Category, enter the Master Page name here. Be sure to spell it exactly as it is in the page layout template!

Flag

This is simply an option you can set to use for reference. For example, you might want to be able to quickly find all Categories that you've flagged because they ahave been newly added.

Comment

A comment about this Category. This is just for reference.

All Projects/Only the current Project

If you have multiple Database Projects in your CatBase database, you can determine whether each Category belongs only to the Project you are currently working on, or if it will be used by all the Database Projects in the database.

Description

You can enter a description of this Category, and this can optionally be published by selecting the Print Descriptions using Stylesheet: option in a Publishing Stylesheet:

Category Description
Web Tab
Category web tab

Use the options on this page for publishing web pages. Note: This will create static HTML or PHP documents. If you want to have a dynamic web site, you'll need to upload the data to a web database such as MySql or SqlServer. You will need CatBase Data Chameleon Edition for this.

Page title

Either use the category name for the page title, or enter some different text.

Meta Tags

Enter the text for the page's meta tags - Description and Keywords.

Use Background Colour

Select this option and then select a colour if you want the page to have a coloured background. If nothing is selected the page background will be white.

Use Background Picture

Select this option and then click the Choose button to select a background picture, if that's what you want for the web page.

Web Picture Name

Select this option to publish an image on the web page, after the category name.

User Data Tab
Category user data tab

The purpose of the User Data fileds is for referencing in scripts. We can write scripts to perform all kinds of special processing.

History tab

This tab shows a list of modifications that have been made to a Category - e.g. changes to its name.

Modifying Categories

To change a Catgory's name or other settings, double-click on it in the Category List.

To move a Subcategory under a different parent category:

  1. Select the subcategory you want to move

  2. Drag and drop it onto the Category that you want to move it under.

For example, I accidentally added Shoes as a subcategory under Food, when it should have gone under Clothing->Mens. So I select Shoes and drag and drop it on Clothing->Mens:​

Move subcategory

Note that if you have already added any records to the category you are moving, the new hierarchy will be respected when the data is published. In other words, in my example here, any records in the Shoes category will be published under Clothing->Mens, not Food.

Importing Categories

Please see the Categories subtopic under the Importing Data tutorial.

Adding Records to Categories

Once you've set up your Category structure, you need to tell CatBase which records belong under which Categories.

The Category List Object

In order to put records under Categories, you'll need to add the Categories Object to your data entry form for the data table. For example, if you want to be able to put records in the Products table into Categories, you will need to add the Categories object to your data entry form for the

Products table. Please see the Form Design Wizard tutorial for informaiton about this.

Here's how the Categories object looks in a data entry form:

Categories form object

Yours might look a bit different. If you've selected any of the Options for the Database Project, you'll have additional columns. For example, suppose we are publishing a membership directory and we want to have the option for members to pay for enhanced entries under certain

Categories; we're offering a Bold option and a Red option. This is how it would be set up:

  1. Go to the Projects main tab

  2. Expand the Database Projects topic on the left of the page

  3. Select the appropriate project (there is always at least one Database Project, and by default it is named Default Project)

  4. Enter "Bold" into the Category Entries Option 1 title field and "Red" into the Category Entries Option 2 title field:

Database project category entries options

Save it

Now the Categories object on the data entry form will look like this:

Categories object

You'll now be able to set up Rules in your Publishing Stylesheets to tell CatBase what to do differently for Bold or Red listings. 

There are several ways to select categories for a record.

Drag and Drop

Probably the simplest way is to drag and drop Categories form the Category list onto the data entry form. To do this:

  1. Open an additional window (choose Open a New Window from the Windows menu)

  2. In one window, display your list of Categories (Admin->Categories)

  3. Make this window a bit smaller and move it to the left or rigtht side of your screen

  4. In the second window, create a new record in your data table, or open an existing record

  5. Arrange the windows so that you can see both the list of categories and the Categories object in the data table at the same time - maybe like this:

Categories drag and drop
  1. Click on a category name, then drag and drop it onto the Categories object on the data entry form.

  2. You can select multiple Categories and add them all in one go.

Right-click / Ctrl-click
  1. Right-click on the Categories object on your data entry form.

  2. Choose Add a Category from the popup contextual menu.

  3. Enter the catgegory name, or part of a category name, or a category number into the dialog box that opens.

  4. Click OK.

  5. If CatBase finds one matching Category, it will add that to the list in the Categories object.

  6. If it finds more than one match, it will display a list for you to choose the appropriate Category.

After some Categories have been selected, the Categories object will look like this:

Main

One Category is always selected as the Main Category. When you set up a Publishing Stylesheet, you can choose to only publish each record under its main category for that particular publishing style. To select a different Main category, select the category that you want to make the main one, right-click on the category, and choose Mark as Main Category from the popup menu.

Omit

You might want to keep note of which categories a record has been put in, but not publish it under all of them. For example, perhaps one year a customer pays for an upgrade, and is then allowed to go into any number of Categories. But this year he decides not to pay for the upgrade, in which case he can only go into one Category. But you don't want to lose track of his other Categories. So you can select the Omit option for all categories except his main one. The record will not be published under any Categories that are flagged as Omit. Note that you can quickly mark all of a record's categories as Omit by right-clicking on the Categories object and choosing Select all 'Omit'.

Category Name

The selected category's name.

No.

the selected Category's unique number.

Bold and Red

These are some of the optional flags that you can set up in the Database Project record. Click in a check box to select an option.

Adding a selection of records to a Category

Suppose you've just added a new Category, and you want to put a number of records into that Category. It might be a bit tedious to find each record, open it, add the Category, save it, find the next record, etc. Here's a quicker way:

  1. In the List view for the data table, find and select the records that you want to put into the same Category.

  2. Right-click on the list.

  3. Choose Put selected records into a category.

  4. Enter the category name and click OK.

Category Entries

Warning - This section is a bit technical!

Each time a record is added to a Category, a Category Entries record is created. These records form the links between the Categories and the data. Normally you will not bneed to be concerned with the Category Entries, as CatBase handles everything for you. However, there may be occasions when you need to understand how this works - maybe so that you can import some data from another data source. To view the Category Entries:

  1. Select the Admin main tab.

  2. Expand the Categories topic on the left of the page.

  3. Expand the Category Entries sub-topic.

  4. You'll see a list of all the Category Entry records.

  5. You can import Category Entry records: expand the Import sub-topic and click New Import Style.

More Info

bottom of page