PHPackages                             ttempleton/craft-category-groups-field - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ttempleton/craft-category-groups-field

ActiveCraft-plugin

ttempleton/craft-category-groups-field
======================================

A Craft CMS field type for selecting category groups

3.0.0(3mo ago)13.1k1[2 PRs](https://github.com/ttempleton/craft-category-groups-field/pulls)MITPHPCI failing

Since Sep 11Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/ttempleton/craft-category-groups-field)[ Packagist](https://packagist.org/packages/ttempleton/craft-category-groups-field)[ RSS](/packages/ttempleton-craft-category-groups-field/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (3)Versions (20)Used By (0)

Category Groups Field
=====================

[](#category-groups-field)

#### A category groups field type for Craft CMS.

[](#a-category-groups-field-type-for-craft-cms)

[![](src/icon.svg)](src/icon.svg)

Usage
-----

[](#usage)

### Single Selection setting

[](#single-selection-setting)

The Single Selection field setting controls the behaviour of a category groups field. When this setting is disabled, the field will resemble a typical multi-select field on an element edit page, and accessing the field in your templates will give you the category group collection. When Single Selection is enabled, the field will resemble a dropdown field on an element edit page, and accessing the field in your templates will give you the category group model.

Field data is *not* altered immediately on changing this setting, in case the setting was changed by accident; the data will only be overwritten when actually resaving its element. However, when Single Selection is enabled, the element edit page and templates will treat the first (in alphabetical order) selected category group as the field's only category group.

New category groups fields will default to multiple group selection. If you'd prefer to use Single Selection as default, copy the following into `config/category-groups-field.php`:

```
