Limit Block Types for an area

Permalink 4 users found helpful
Hi,

is there a way to limit block types for a specific area?

dendeffe
View Replies: View Best Answer
synlag replied on at Permalink Reply
synlag
yup, see

http://docs.concrete5addons.com/...

area model..
dendeffe replied on at Permalink Reply
dendeffe
Thanks. So, do I use Area::overrideCollectionPermissions?
Remo replied on at Permalink Reply
Remo
Ron, what are you trying to tell us? That link doesn't have any specific information about his question.

Did you try to use the advanced permission mode? Put this in your site.php:
define('PERMISSIONS_MODEL', 'advanced');

and you'll have a lot more options...
dendeffe replied on at Permalink Reply
dendeffe
Remo,

I've set the permissions to advanced, but am not sure where I set the blocks that are allowed in an area.
netclickMe replied on at Permalink Reply
netclickMe
Ok, block types can be narrowed down for users with advanced mode but administrators still have full permission and thus all block types are still offered. There must be a way limit types with the code.

What I need is a navigation area that will have the option to add the Auto-Nav and also content block, or html for extra customization.
sebastienj replied on at Permalink Reply
sebastienj
I think is like that no ?

$a = new Area('Main');
$a->setBlockLimit(3);  
$a->display($c);
dendeffe replied on at Permalink Reply
dendeffe
That limits the amount of blocks that you are able to add, right? I'd like to only allow certain types of blocks in an area.
synlag replied on at Permalink Best Answer Reply
synlag
Yeah, got it.

If advanced permissions are enabled you can limit block types to an area by clicking on an area in edit mode and then click on permissions.

I haven't tested, but you should be able to set this for page defaults too.

--ron
dendeffe replied on at Permalink Reply
dendeffe
Ah, I see, I had to click the 'Add' bit to select select the area permissions. Thanks for the help everyone!
MadQuint replied on at Permalink Reply
Hi synlag,

Sorry for bringing this post up...but I've tested this on page defaults too but doesn't work.
Concrete5 allows me to do set advanced permissions through page defaults but when testing on front-end it simply doesn't work. I'm not sure it's even meant to work.

Being trying to figure this out.

Cheers
Gianni
jmcgarvey replied on at Permalink Reply
jmcgarvey
Has anyone resolved this? I set advanced permissions in app.php, went into DEFAULTS for my template, clicked on the block I want to limit, checked IMAGE only in the REGISTERED USERS section and saved. Created a new page and clicked ADD BLOCK and I get all the block types, not just IMAGE.
sdjmchattie replied on at Permalink Reply
This is an absolute guess, but isn't that because you're the superuser? Try with a second account and you can probably only add the ones you've given permission for
aghouseh replied on at Permalink Reply
aghouseh
I had the exact issue. Logging in as non-superuser administrator showed the settings properly.