Search code examples
concrete5

Concrete5 - Force a certain block type for an area


Is there anyway to force a certain area to use a certain block type? for example:

$a = new Area();
$a->setAllowedBlocks(array('autoNave','content')); 
$a->display($c)

Is there any thing like: setAllowedBlocks?

Thanks


Solution

  • Unfortunately there is no way to do this as you asked. It is possible to set the allowable block types by turning on Advanced Permissions: http://www.concrete5.org/documentation/general-topics/simple-permissions#advanced

    But note that this might be overkill for such a simple requirement (depends on how badly you want to restrict the allowable block types for your areas).