Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8837

Kentico 9 - Limit page type based on page template

$
0
0
I'm trying to limit editors to create wrong document on Kentico nodes. I know there is Page Types -> Scopes for this, but in my case it is hard to configure it. In my scenario I have a repeated node structure like this:Root (template: ROOT) - Page 1 (type: Page; template: PAGE) - Page 2 (type: Page; template: PAGE) - Page 3 (type: Page; template: PAGE) ... - Section A (type: Page; template: SECTION) - Node 1 (type: Page; template: NODE) - Node 2 (type: Page; template: NODE) - Node 3 (type: Page; template: NODE) ... - Section B (type: Page; template: SECTION) - Node 1 (type: Page; template: NODE) - Node 2 (type: Page; template: NODE) - Node 3 (type: Page; template: NODE) ... - Section C (type: Page; template: SECTION) - Node 1 (type: Page; template: NODE) - Node 2 (type: Page; template: NODE) - Node 3 (type: Page; template: NODE) ... Editor could create a lot of sections, but always with the SECTION template. I want that under a Section an editor can create only a Node of type "PAGE".This is what I'm trying to do: I create a new Macro rule (on Macro rules application) that check if current page has a specific template (passed on parameters) see imageThen I create a new Scope (Page Type -> Scopes) see imageI think it was all ok (on "Section A" I can add only "Page" documents), but also in "Page 1" (with template different from SECTION) I can add only "Page" documents. It seems that my condition return always "true"I try to change the parameter field in my Macro with "DocumentPageTemplateID" against "NodeTemplateID", but I have the same result.I believe to be close to the solution. Can you help me?PS: I know that I can create a different page type for Section A, B, C and then use the Page Type Scopes, but I prefer to do this in base of the Template instead of Type.Thank you

Viewing all articles
Browse latest Browse all 8837

Trending Articles