Grouping Block Types into Sets

In Concrete CMS 5.7 we introduced the concept of Block Type sets. Each Block Type can appear in a set, which will group it with similar block types in the add block user interface.

Sets

The following sets are available in 5.7 by default.

  • Basics
  • Navigation
  • Forms
  • Social Networking
  • Multimedia

To make sure your block type appears in the right set, just add this protected variable to its controller class

protected $btDefaultSet = 'your_set';

Where your_set is one of the following (to correspond with the list above):

  • basic
  • navigation
  • form
  • social
  • multimedia

To create additional block sets, for example in a package, you can use:

use BlockTypeSet;
if (!BlockTypeSet::getByHandle('handle')) {
    BlockTypeSet::add('handle', 'Name', $pkg);
}

Note that if you previously installed your block type without a set, you'll have to remove it and reinstall it for the new set to take effect.