Create Custom Footprints In Experience Manager
Are you feeling bored with Tridion coding? Let’s play with the configuration files and create custom footprints in experience manager.
In case you don’t know what footprints are, then let me tell you .A footprint is a way for an content editor / marketer to override the claims which are used to determine which personalized content items to show.
For example you have a requirement to personalize the banner of your multilingual site on the basis of location. So you have to create a custom footprint in the Experience Manager to override the claim.
Here We Go:
So once your claim and trigger is ready to use, just follow 3 simple steps to create a custom footprint. I personally called it 3C to remember the Steps.
Here are the 3 steps –
Create Icon for Footprint.
Configure the footprint in XPM.
Claim value set by changing configuration in web application.
Create Icon for Footprint:
This is an optional step. It is definitely nice to have but if you want you can skip this step. In that case it will show a blank space. Or You can use the default icon that is available in the system.
If you want to create it: –
create your icon for four different sizes
Save it as a PNG file. Maintain the right naming convention for the icon – <footprintname>.<width>x<height>.png. Say you are using footprint.location here, then your file name will be :
Upload it under the below path -“<TRIDION HOME>\web\WebUI\Editors\SiteEdit\Themes\Carbon2\Images\Icons”
Configure the footprint in XPM:
To configure your footprint in XPM you have to do the changes in 2 config files – Models Config
Go to the server where Tridion is installed
Open <TRIDION HOME>\web\WebUI\Models\SiteEdit\Configuration\SiteEditModel.config
Look for the ‘footprints’ element and insert the new footprint for location –
Here are the sample footprint –
<footprint ID=”location” claimUri=”taf:claim:ambientdata:sessioncartridge:location”> <title> <value lang=”1033″>Location</value> </title> <description> <value>Select for checking how the page looks like for different Location.</value> </description> <values> <value text=”Kolkata”> <label lang=”1033″>Kolkata</label> </value> <value text=”Mumbai”> <label lang=”1033″>Mumbai</label> </value> <value text=”Bangalore”> <label lang=”1033″> Bangalore </label> </value> <value text=”Delhi” default=”true”> <label lang=”1033″>Delhi</label> </value> </values> </footprint>
The ID (ID=”location”) of the footprint used to connect the model configuration with the configuration of the editor.
claimUri (claimUri=”taf:claim:ambientdata:sessioncartridge:location” ) must match with your claim in ADF.
Value text (value text=”Kolkata”) must be same as defined in the Trigger.
Label (<label lang=”1033″>Kolkata</label>) is used to show the text on the footprint only.
(default=”true”) is used to set as default value.
Open <TRIDION HOME>\web\WebUI\Editors\SiteEdit\Configuration\SiteEditEditor.config
Look for the ‘footprints’ element and insert a new footprint there.
Add below footprints there-
<footprint ID=”location” controlID=”FootprintRadio” Icon=”footprint.location” />
The footprints are shown in the order in which they appear in the editor configuration, so you can determine yourself where you want your footprint to show up in the list.
The ID must match the ID used in the model configuration
The controlID must be a valid footprint control (you can choose from FootprintDate, FootprintDropDown, FootprintRadio and FootprintText). To show the list value on the XPM you have to use FootprintRadio.
The attribute Icon must contain the part of the filename of your icons.
Claim value set by changing config in web application:
This is very important step; otherwise the footprint will not be able to override the claim value.
So to allow this claim to be set by XPM footprint you need to modify the xml within the web application.
Look for an element called GloballyAcceptedClaims, and add the following XML fragment inside this element:
Now restart the web application.
Finally you are ready with your custom footprint. Open your XPM, Under the Preview tab click on the Edit Footprint –
Here is your custom footprint –
Choose one value from the list and Apply.
Check the log file for the smart target to ensure your claim is set by XPM.
Parsing parameter sc_location: Delhi Adding [CustomParameterCriteria: sc_location=Delhi]
Hey! Hope you have enjoyed the Blog. Just put a comment if you need any further information regarding this.