Try our conversational search powered by Generative AI!

Hide page templates in EPiServer multisite environment

Vote:
 

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.

#122457
Jun 03, 2015 7:56
Vote:
 

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:

http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/8/Content/Attributes/

#122460
Jun 03, 2015 8:29
Vote:
 

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.

#122461
Jun 03, 2015 8:31
Vote:
 

@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?

#122462
Jun 03, 2015 8:37
Vote:
 

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
#122463
Jun 03, 2015 8:41
Vote:
 

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.

#122464
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.