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.

Activity

Show:
Stefan Seifert
May 2, 2018, 4:37 PM

thanks! - it's merged

Konrad Windszus
May 2, 2018, 3:22 PM
Konrad Windszus
May 2, 2018, 12:42 PM

Can you reopen this ticket then?

Stefan Seifert
May 2, 2018, 12:33 PM

that would be perfect! i want to do a new release soon.

Konrad Windszus
May 2, 2018, 12:31 PM

That sounds good. Do you want me to come up with a PR?

Fixed

Assignee

Stefan Seifert

Reporter

Konrad Windszus

Labels

None

Components

Affects versions

Priority

Major