Skip to content

Multi Site Tools

Heiko Franz edited this page Nov 23, 2016 · 2 revisions

Atlas comes with a range of tools that make multi-site development in Sitecore easier.

IDataSourceProvider and ConventionBasedDatasourceProvider

The IDatasourceProvider model allows you to re-use renderings across multiple sites and have each site maintain their own data source locaiton. Without this customisation, the data source folder is commonly hard coded with a full path (including the site name) and renderings cannot be reused.

Alas comes with a convention based datasource provider which can be swapped or extended if required.

Enabling the data source provider

In order to use the data source provider, register DeloitteDigital.Atlas.Multisite.Datasource.IDatasourceProvider, DeloitteDigital.Atlas to type DeloitteDigital.Atlas.Multisite.Datasource.ConventionBasedDatasourceProvider, DeloitteDigital.Atlas in the DI container of your choice.

Then add the following pipeline processor via a Sitecore patch file:

<getRenderingDatasource>
    <processor type="DeloitteDigital.Atlas.Multisite.Datasource.GetDatasourceLocationFromProviders, DeloitteDigital.Atlas" 
        patch:after="processor[@type='Sitecore.Pipelines.GetRenderingDatasource.GetDatasourceLocation, Sitecore.Kernel']"/>
</getRenderingDatasource>

Using the convention based data source provider

Set the data source location for your rendering to convention:Module Name, e.g. convention:Accordion. This will dynamically create a data source path like this

/sitecore/Content/{{SiteName}}/Content Modules{{Module Name}}

The other parts in this parts are convention based.

Convention

Triage Workflow

The "Triage Workflow" is a concept that allows for dynamic application of workflow to content pages and modules based on where in the content tree they have been created. This means, content templates can be re-used on multiple sites but the site-specific workflow is applied when an instance of the template is created. The following diagram illustrates the flow:

Triage

Enabling the triage workflow

TODO

Using the triage workflow

TODO