Concrete5 - Force a certain block type for an area
-
12-06-2021 - |
Question
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).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow