JesseEarley
JesseEarley

Reputation: 1032

Mura CMS 7 - restricting content types?

I know that content types can be extended using Extension Manager, but can the default content types be restricted so that they aren't available for non-admins?

For example, let's say I extend 'Page' and create a sub-type called 'Product Page', is there a way to hide or exclude the default page option when creating a new page so that editors can ONLY select the sub-type I've created?

EDIT:

Here is a bit more information: I've created several class extensions of "Page" (or modified existing extensions), such as "Home", "Information Page" and "Article Page". enter image description here

The circled type "Page" is the one I'd like to hide from users. per @Miguel-F in the comments below, I also created an extension of type "Page" with a subType of "Default" through the "config.xml.cfm" file. Back on the admin side, I went to Extension Manager: enter image description here

and modified "Page/Default". Here I selected "Yes" so that users can only use a specific subtype, and then deselected the "Default" option, choosing only the types I want my users to be able to use: enter image description here I've setup a test user who is not an Admin, and tried this out with that account, but when they go to add content, they get the same "Select Content Type" screen picture above, complete with the "Page" option I don't want them to have.

Upvotes: 1

Views: 311

Answers (2)

Damien
Damien

Reputation: 3220

The availableSubTypes attribute (named "Allow users to add only specific subtypes?" in the admin UI) defines available types for content children of a parent page with a specific type. The name is a bit confusing: availableSubTypes does not define a type's available subtypes.

So, if you are only using subtypes and you want to restrict available types everywhere, you have to add your list of available types for all your new subtypes, not just Page/Default (and actually it will not be necessary for Page/Default since you will not be using it).

Upvotes: 0

John Sieber
John Sieber

Reputation: 322

If you would like to go the route of hiding the default page content type via css or javascript you should be able to use the following gist created by Steve Withington as an example.

https://gist.github.com/stevewithington/82028081148217ada55b

Upvotes: 1

Related Questions