Limiting Available Blocks Per Editable Area

Permalink 1 user found helpful
Two question, I am sure the first is easy and the second very difficult.

1.) I have a site with a bunch of editable areas. How can I limit which blocks are available when a user adds a block. For example, I want a user to be able to add an image block, but not an RSS feed. If this can be done per user, great, but even globally will work.

2.) Any way to limit the size of an image in a particular image block? I have areas where I would not want an image wider that say 400 px to be seected.

Thanks all!

 
okhayat replied on at Permalink Reply
okhayat
1. This is possible with advanced permissions.
First enable it by editing config/site.php and adding this line before the closing ?>:
define('PERMISSIONS_MODEL','advanced');
Save and exit. Goto the page, edit, click on the Add to Area, then Permissions (tab).
Set the Blocks/Permissions for user/group you want to give access. Note the change applies to the current page only.
2. I don't think you can limit the selection to an image of a particular size, but instead, you can use a custom template for the Image block, for example, to create a thumbnail with the size you need if the image is larger.
nodiseos replied on at Permalink Reply
Thanks, this works great :).
aghouseh replied on at Permalink Reply
aghouseh
I am having issues getting this to actually perform the functionality that is built. I am able to do everything to restrict permissions, but then when I try to add a new block to an area, I am given the full array of blocks to choose from, instead of only the ones which I have selected in the permissions for that specific area.

Anyone have any insight to this?

Thanks in advance!
aghouseh replied on at Permalink Reply
aghouseh
Solved my own issue!

While testing this, a co-worker realized that we were logged in as the original "admin" user that trumps all permissions. After creating a second user in the group "Administrators" and logging in, the block creation for the given area was restricted exactly as specified!

I'm always finding new reasons to love C5. Great job folks.