Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Hide page templates in EPiServer multisite environment


Hi, simple question:

Is there a way to hide a page template in an EPiServer multi site envirionment so that only one site can access a specific page template.

Jun 03, 2015 7:56

Do you mean hiding it in the CMS, so content editors can choose it? You could do so by setting access rights attributes on the page types:

Jun 03, 2015 8:29

I havent tried but I guess you could use virtual roles and permissions.

At init create a virtual role for each site and set permissions on the pagetypes to make them available to the sites that should have them.

Jun 03, 2015 8:31

@Patrick: As I understand, setting access rights is only working for specifying which page templates should be available under another page template. I cannot find any way to restrict a page template to a specific site i our multi site solution. 

@Thomas: But since we use the same page templates on booth sites this does not seem to solve my problem?  or do I understand you wrong?

Jun 03, 2015 8:37

Wouldn't be a solution to define a content editor user for each site in your multi-site environment. And set the Access attribute on you page type. Below an explanation of the Access attribute:

'The optional Access attribute defines which users, roles, and visitor groups that will have access rights to create content of a specific type in the user interface. Filtering based on this attribute is applied after ordinary access rights on content.'

Property nameDescriptionBehavior if not specified

Users, Roles, VisitorGroups Defines which users, roles, and visitor groups that will have access rights. No user have access to content type
Jun 03, 2015 8:41

Permissions are not limited to a single role - you could give multiple roles access to a ContentType.

Patricks solution do not require any coding at all - only restructuring your existing access/editor roles, and probably the easiest to implement and maintain.

Jun 03, 2015 8:49
* 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.