-
Notifications
You must be signed in to change notification settings - Fork 14
Site Configuration Management
Site Configuration Management
In order to leverage many of these features, they need to be able to access Site specific configuration values. ASF does this by Creating a separate "Site Configuration" Item for every Site. If you choose to use the Information Architecture feature, there is a pre-built Branch Template for Creating Sites that include this item, but it is very easy to roll your own.
Although the above screenshot shows many sections of settings, it is important to note that the Site Configuration Template actually has no fields defined on it. It leverages template inheritance to import the templates needed to support the features that you want. This can be done on the content tab of the template.
Which template to use here is explained in the feature sections that follow, and sometime may also require a similar approach to page templates to ensure the proper fields are defined to support specific features.
Configuring Sites
Sites are connected to Site Configuration through an attribute "SF.SiteConfiguration" in the "Site" definition configuration. This configuration allows you to share Site configuration across multiple sites if desired, but is generally recommended to have a unique site configuration per site.
Note that features are coded such that Site Configuration is properly resolved in both published content and experience editor. The one area where this is sometimes an issue is in template standard values as they exist outside the site node and templates can be shared across sites.
Site App Settings
This core feature of ASF also has one additional sub-feature. You can store "Site Settings" item under your Site Configuration Item (The standard templates that come with ASF have this insert option pre-configured). A site setting is a string based key value pair similar to App Settings. They allow you to define additional configuration values easily if you don't want to create a full blown Site Settings Configuration Class.
By default Sitecore Foundation will look for any settings stored under the Site Configuration node, but you can override this behavior with an additional Site attribute “SF.ConfigRoot”
This enables you to have sites share configuration, or to maintain multiple Configurations for different environments and switch them with transforms during deployments.
To access their values, you can use the indexer on the Context through extension methods on the Sitecore Site Configuration.
Note that you’ll need to include a reference to “SF.Foundation.Configuration”.
Introduction
- Getting Started
- Resources
- Supported Versions and Branches
- Sitecore Foundation for SxA
- Layer and Sitecore Dependencies
- Acknowledgements
Feature Guide
- Leveraging the Framework
- Site Configuration Management
- Information Architecture
- Dynamic Placeholders
- Handlebar Renderings
- Scripts and Styles
- Meta Tags
- Social Tags
- Redirect Manager
- Site Map
- IP White Listing
- PDF Generation
- Favicon
- Robots
- Parameterized Renderer
- Site and Feature Cache Cleaning
- Site Error Handling Overrides
- Shell Extensions
- Multilingual Features