Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×I have created automation that adds a label if the text of the page title contains Business Rules. This works fine. However, I would like for all child pages of that page to also get the same label. I have not implemented yet as the CQL says this will apply to all pages in the space, so want to avoid that. Here is what I have. Should this work?
I think in the CQL you should use a clause like this:
ancestor = <the ID of the current page>
You should the corresponding smart value instead of my dummy placeholder, of course. It should give you the idea though.
That way, the query will return those descendants of the page that are not labeled with "business_rules".
So this space is a large space the contains page trees for each of our customers, approximately 200. Each customer will have a parent page that contains Business Rules in the title. I would like to have this apply to existing child pages of the business rules parent page. In your suggestion you reference a specific page ID. Does that work for my use case?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes.
Because your automation rule will be triggered by one concrete "Business Rules" page, the rule will receive the ID of that concrete page. If you use that ID in the CQL clause, then the CQL search result will include the descendants of "Business Rules" page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So my challenge her is I have a page tree structure similar to:
and so on
How would we apply something like this in this case?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Roughly speaking, the automation rule should be built like this:
ancestor = {{page.id}}
I hope this will give you the "inspiration".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.