Page type - restricting by scope

Tom Troughton asked on January 26, 2016 10:36

I'm trying to understand how to limit the creation of a particular page type to a specific node in my site.

The site has a set of nested nodes all of type CMS.Folder e.g.

  • Settings
    • Group One
      • Sub-group One
    • Group Two etc.

I want to define a page type which can only be created under alias Settings/Group-One/Sub-group-One so I set its allowed parent to be CMS.Folder only then I associated a scope for this specific alias.

I assumed the combination of these settings would give me what I need.

However, I find I can still create the page type directly under Settings. Am I missing something here?

Recent Answers


David te Kloese answered on January 26, 2016 11:01

Hi,

what version of Kentico are you using? Using scope is the correct way to accomplish this!

Greets,

David

0 votesVote for this answer Mark as a Correct answer

Tom Troughton answered on January 26, 2016 11:46

Sorry, version 8.2. That's what I thought but if I set up as described then I can still create the page outside its defined scope.

If I only use scope (removing all allowed parents) then I can't create it anywhere, so presumably scope alone is not sufficient.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on January 26, 2016 12:54

Hi,

In Kentico 9 this behavior is as you expect (and explained above). In Kentico 8 however the only easy workaround I can find is set an extra scope for the higher level and exclude the your page type (or select none).

Otherwise I'm afraid you'll be needing some custom code; for example document events, to check this..

Greets,

David

0 votesVote for this answer Mark as a Correct answer

Roman Hutnyk answered on January 26, 2016 14:11

Go to Page Types -> Scopes and configure appropriate scope. Later on assign that scope to your page type. That should work for you.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.