Details
-
Improvement
-
Status: Open
-
Normal
-
Resolution: Unresolved
-
4.2.1
-
None
-
None
Description
After some investigations, in one of the internal projects the team discovered that the _index_ feature provides an OOTB fallback functionality. This kind of functionality is extremely useful when documents are shared across the channels.
In a shared content setup one of the main goal is to serve channel specific documents and shared documents under the same URL. The existing solutions are mainly based on custom sitemap handlers and custom link processors: this means custom functionality impacting the normal HST behavior and extra code to maintain.
Following the shared folder structure proposed by Ivo [1] and using the _index_ matcher, is possible to create a sitemap structure implementing a fallback scenario. So HST will first look at the channel folder; if the document is not there, then it will try to match a document under the shared folder. This is an example of sitemap structure with fallback scenario:
- hst:sitemap
- insurance (relativecontentpath = ${scope}/insurance)
|
- any (relativecontentpath = shared/insurance/${1})
|
- index (relativecontentpath = ${scope}/insurance/${1})
During the investigation we also we noticed that this functionality doesn't break link rewriting. Moreover, site searching is also working since the 'root content' points to the content folder (is the parent of the shared and channel folders).
As we agreed in the ML, the main goal of this improvement task is to add new integration test to make sure that the fallback functionality will keep working in the upcoming releases.