All Collections
Categories
Category grouping, parent-child, ordering and filtering
Category grouping, parent-child, ordering and filtering
Michael Fatica avatar
Written by Michael Fatica
Updated over a week ago

MetaLocator's category system is a fundamental component of the software.  Understanding the category system is key to unlocking powerful features such as:

This article will cover some more advanced aspects of categorization, including grouping categories and leveraging category parent-child relationships to build cascading form selections.

Grouping Categories

When categories are grouped, they can be used separately in the display in both the search form and the results.

Category Group Names can be used used as bolded labels as shown below:

In the above example, Location Type, Process are the Category Group names.

Additionally, the Category Group Names are also used to group Search Form options.  Within Form Settings > Search Form, a common search option is Category as shown below:

Parent Child Relationships between Grouped Categories

Categories can have parents and children that allow you to enable or disable child category options based on the selection of parents.  This relationship is leveraged in the Search Form when displaying multiple grouped category drop-down lists with and Category > Chain drop-downs? is set to Yes.

If the user chooses Location Type above, the Services drop-down will be filtered to display only the Services available from that Location Type, as defined by the category list:

Notice that the ordering of the Category Groups is incorrect above. Ideally, we'd like the user to choose a Location Type first, then Services. This can be adjusted by manipulating the Category Group Order of any category under Location Type to a number lower than the Category Group Order of Services.

When you update one category's Category Group Order the system automatically updates the Category Group Order of any other category in that same group.

Warning: It is possible to create infinite loops of chaining by chaining a child to a parent in the same drop-down. Avoid this by ensuring that parent categories are in different Category Groups than their children, ensuring they appear in separate drop-down lists and are therefore chain-able.

 

Category and Category Group Ordering

Categories are assigned a sequential ordering number during the import process.  To re-arrange the categories manually, click Categories, then click the Order column, notice a draggable icon appears as shown. Drag and drop the categories in order to manipulate the ordering

To manually adjust category ordering and category group ordering, edit the category as shown below:

Categories with a higher ordering value appear lower in this administrative list.  The ordering is reversed on the public-facing interfaces, meaning categories with higher ordering values appear first in the list of categories when presented to the end user in a drop-down or category list.

Categories also have a group-level ordering called Category Group Order.  This is useful when displaying a list of categories in groups and you want to control the ordering of the presentation of the groups.  Edit the category group ordering by editing any category in that group.  Set the ordering value as a number and every other category in that group will be appropriately updated with the new group ordering.

In the above example, the Primary group has an ordering value of 0 and the Secondary group has an ordering value of 1.  This sorting is the opposite behavior of the category ordering.  In category groups, lower numbers appear first in the display.  In the below example, we have set the Secondary ordering value to 1 and the Primary group ordering value to 2.

Filtering Categories in the Search Form

In certain contexts you may want to hide the display of a category or categories.  This might occur in the Search Form, or in the Results.  To hide a category from the drop-downs or check-boxes in the search form, modify the category settings to disable "Show in Search" for that category.

Filtering Categories in the Results

When displaying category lists in the results you can filter the list of categories by selecting group names as shown in the Category settings:

Filtering in the Search Form

The search form options can be similarly filtered by group as shown below:

Active Categories

MetaLocator can limit the available categories in the drop-down lists to those associated with the available data, as defined by the published data and active Interface filters. This allows the category drop-down to dynamically display only categories which will return results.

Did this answer your question?