Extend custom ContextPathStrategy to allow a CAC editor page outside the main content tree
Description
Usually the CAC editor page is placed outside the main content tree, e.g. in the sample-app the config editor is at /content/contextaware-config-sample/en/config while the main content is at /content/contextaware-config-sample/en/sub-page. Currently both {{ContextPathStrategy}}s being shipped with extensions don't properly support this content layout:
the AbsoluteParentContextPathStrategy only works if only levels above the topmost editor page level are configured. For example if this strategy is configured with levels [1,2,3,4] the context path for /content/contextaware-config-sample/en/config.html would be incorrectly detected as /content/contextaware-config-sample/en/config/jcr:content, i.e. would not apply to all other content in the site!
the RootTemplateContextPathStrategy requires us to whitelist all non-editor template paths.
To solve this it would be helpful to e.g. to use regular expressions in the RootTemplateContextPathStrategy to blacklist only the editor template itself.
Activity
thanks! - it's merged
I created a new PR in https://github.com/wcm-io/wcm-io-caconfig/pull/22.
Can you reopen this ticket then?
that would be perfect! i want to do a new release soon.
That sounds good. Do you want me to come up with a PR?