SaaS CMS has officially launched! Learn more now.

Allowing/restricting content types dynamically?


It's fairly straightforward to allow/restrcict certain content types to be added to content area through attributes.

Is is it possible to control allowed/restricted content types dynamically, for example based on some other property?

Something that is really close to the OOTB look & feel as a result, allowing user to drag allowed types, not highlighting if not allowed type is dragged over etc.


I think I should be able to create MetadataExtender that sets the AllowedTypes property. Is this right?

Edited, Jun 10, 2020 16:29

Hi Jerzy

it depends on the use case I guess. I've not tried the approach but a virtual role could be suitable depending on how the external property is configured. 

This allows to determine membership of the virtual role programmatically. 


Jun 10, 2020 18:57

Ps Dejan has a nice write up on using Virtual Roles here:

Jun 10, 2020 19:41

Allan has a nice writeup that can help as well

Jun 11, 2020 8:17
David Knipe - Jun 11, 2020 8:20
Thanks Jeroen, even better when someone has written the whole thing up :)!

I was thinking about a bit different use-case. My use would be that admin would enable/disable certain types of block on page instance. E.g. there is multi-select in Admin tab and they can select what block can be added. Then editors could DnD block of those type on this page instance.

Technically editors can create all types of blocks anyway, but what they can add to a page at a given time is controlled per page instance.

Jun 15, 2020 7:08
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.