Setup & Configuration

Advanced Categories has been deprecated and is no longer for sale or supported. ExpressionEngine 7.4 introduces many of Advanced Categories features as natively to ExpressionEngine.

Advanced Categories is a custom fieldtype that acts as a facade to manage assignment of categories to entries in ExpressionEngine. Before an entry is saved, the values from the Advanced Categories field are assigned to the ChannelEntry object the same way a normal category field assigns its values. As far as ExpressionEngine is concerned, an Advanced Category field is just a category group assigned to an entry.

There are 2 important things to note when using Advanced Categories:

  1. Category groups must still be assigned to a channel. You can not add an Advanced Categories field to a channel, assign categories to the field, and expect it to work. Advanced Categories will only display categories that are also natively assigned to the channel through the channel management settings.

  2. When using Advanced Categories it is highly recommended to use Publish Layouts to change the display of the default category groups in the Categories tab. Hide category groups that are made irrelevant based on how your Advanced Categories field is configured.

On the left, in the image below, is a default view of an entry publish page when 3 category groups are assigned to the channel, and on the right are 2 Advanced Category fields assigned to the channel. They look very similar, and that is by design, however, they behave differently. The "Call Signs" field on the right has been configured to require at least 1 category selection, but no more than 3. It also happens to be listing the same categories from the Call Signs category group on the left. The rules, and each of the category options were selected to display in the "Call Signs" field settings page. If the default category group remains visible on the publish page users can still interact with it, but if any category in the default category group is assigned as an option in an Advanced Categories field, then the categories selected in the Advanced Categories field will superceed anything selected in the default category group.

If an Advanced Categories field lists category options from more than 1 category group, and only a single category is selected, such as the Primary Category field on the right, then all other category groups that have a category as an option in the Advanced Categories field will be deselected. For example, if the default category group "Fruits" was not removed from the Categories tab using a Publish Layout, and the user selected "Apple", but then selected "First Order" from the "Primary Category" field, "Apple" would be deselected and not saved to the entry. This would happen even if the "Primary Category" field allowed more than 1 category to be selected. If no categories from the "Fruits" group were selected in an Advanced Categories field, then no categories from that group are saved to the entry.

Using Publish Layouts

Now that you know how Advanced Category fields work, you can take advantage of Publish Layouts. Below we see the Advanced Categories field called "Primary Category" along side the default "Call Signs" category group in the Categories tab. By taking advantage of Publish Layouts, you can use Advanced Categories to offer more control over entry category assignment. If an Advanced Categories field is meant to replace an existing category group (or multiple groups), then you may want to consider hiding those groups.

Rules

One of the main reasons Advanced Categories exists is to be able to assign rules to entry category assignments. The default category group fields do not offer the ability to require a number of categories to be selected, nor can they prevent more than 1 category from the group from being selected. Sometimes you need to be able to have such control over category assignments.

In this example, the field has a rule to require at least 1, but no more than 3 categories to be selected. Once 3 selections have been made the other options are disabled preventing additional selections. You can also add custom instruction to the field, which is something you can not do with a category group.

If a field does not pass validation, you will be informed as such, just like you would any other custom field on the entry.

Last updated