Technical documentation - Profile.config snippets

This instruction explains the concept of snippets that may be used in profile.config. Snippets may be used to include profile settings from a separate file into profile.config. This may be useful if a customer has several sites which are very similar and will then simplify configuration.

Version 4.5

Snippets for profile.config is available in version 4.5 and later.


Instructions

Profile.config may refer external files which will be imported into profile.config.

profile.config sample
<?xml version="1.0"?>
<ProfileSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <!-- Sample profile.condig which fetches a snipet -->
   <GlobalKit persistent-identity="multipacks"/>
   <ProfileConfigSnippetGroup>
      <ProfileConfigSnippet>permission_snippet.config</ProfileConfigSnippet>
   </ProfileConfigSnippetGroup>
</ProfileSettings>


The snippet contains the following xml.

snippet.config sample
<?xml version="1.0" encoding="utf-8"?>
<Snippet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <!-- This will get included into profile.config -->
   <Permissions>external</Permissions>
</Snippet>


Profile.config will end up like this:

profile.config end result
<?xml version="1.0"?>
<ProfileSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <!-- Sample profile.condig that is loaded at start up -->
   <GlobalKit persistent-identity="multipacks"/>
   <!-- The ProfileConfigSnippetGroup will be replaced with the content of the listed snippet files -->
   <Permissions>external</Permissions>
</ProfileSettings>


Several snippet files allowed

It is possible to add a list of snippet files within the ProfileConfigSnippetGroup block. But only one block of ProfileConfigSnippetGroup is allowed.