Limiting scope when using Groups/Intranet department templates?

Joe Krill asked on December 17, 2014 19:56

I'm using the "Intranet Departments" features, and each department has similar section like "Calendar", "News", "FAQs", etc. I'd like to set a scope for those pages so that only certain page types can be created under certain sections (CMS.BookingEvents in Calendar, CMS.Faq in FAQs, etc). Is there a way to set a wildcard of some sort when defining a scope? If I define the scope on the template page, it doesn't carry over to a specific department's page.

Correct Answer

Virgil Carroll answered on December 18, 2014 05:40

Joe thanks for the further explanation. What you say makes sense, but I agree with Brenden that you could try that method but I am not sure that is going to work.

Your better strategy is to make each parent FAQ the same page type (and you could inherit it from the page (menu) page type if that is what you are using). In the custom page type you can both set scopes for areas or you can just set what can be a child to that page, then when you use your template above it will carry the correct settings along. Does that make sense?

0 votesVote for this answer Unmark Correct answer

Recent Answers


Virgil Carroll answered on December 17, 2014 20:43

Just to clarify, when you say you are setting the scope on the template page, you mean the page type? And you are using that page type to create these section pages you want creation locked down under?

I do not know of anyone to create scopes as wild cards, but if you are using different page types but have some other kind of data that ties these pages together (i.e. makes them similar) you may be able to do something through the API to lock down what could be created under different page types.

1 votesVote for this answer Mark as a Correct answer

Joe Krill answered on December 17, 2014 20:53

I think that's correct. Let me try to clarify., I'm using the "Intranet Department" feature. So I have a "Department template" in the document tree that defines how I want my departments to look...

+ Root
    + Departments
        + Template
            - Calendar
            - FAQ
            - News
        + Human Resources
            - Calendar
            - FAQ
            - News

When I create a new "Intranet department" document under \Departments, it uses the structure of the \Departments\Template node to create the structure of the new Intranet department. So that's what I was referring to when I was saying "template", earlier.

So I'd like to be able to set a scope on \Departments\Template\FAQ so that only CMS.Faq pages can be created underneath it. And I've done that. Then, when I create a new Intranet department document, I was hoping it would either copy that scope to it's own FAQ node, or somehow that scope would also apply there. But that doesn't seem to be happening. It seems like it really should do that.

Does that make sense?

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 18, 2014 02:25

Have you tried using the wildcard URL selector like this: /{0}/{1} in the "This scope covers" box? I haven't tested it but it may or may not work.

Guessing you already read the scope documentation? There is some info in there regarding multiple scopes per page type. This may be the way to maintain it is add each of your departments in as allowed scopes.

If you don't want to maintain the multiple scopes manually, you could create a global event handler and use some API code to create that new scope similar to what Virgil was talking about.

0 votesVote for this answer Mark as a Correct answer

Joe Krill answered on February 12, 2015 19:13

I just wanted to follow up on this, because I found another way to handle this.

First, to address Brenden's suggestion: that won't work -- you can't use wildcard selectors in Scopes.

The other way I've found is to set the scope path ("This scope covers") to something broad enough to cover all possible cases (even just "/" works). Then be sure to select "Apply to the whole section". Finally, add a condition to check the NodeAliasPath however you'd like. For example, using a Regex, like this:

Matches(Document.NodeAliasPath, "/Department/[^/]+/Calendar")

I'm not sure if there will be any performance issues here. I doubt it, because I think this is only checked once when creating a new document.

The main downside is that there's no way to give a scope a title or description. So when you're looking at your list of scopes, it only shows the Starting path, which won't be very descriptive in this case.

0 votesVote for this answer Mark as a Correct answer

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