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:

  1. 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!

  2. 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.

Status

Assignee

Stefan Seifert

Reporter

Konrad Windszus

Labels

None

Components

Affects versions

Priority

Major
Configure