Monthly Archive: June 2024

Injecting Fragments in Optimizely XHtmlStrings

Injecting fragments in Optimizely XHtmlStrings is quite easy using a custom display template to render the property. Here is an example on how you can inject custom data based on Optimizely blocks dropped in the XHtmlString property. I’ve been using an approach similar to this to inject ids used for anchor tag navigation also within free text. The interesting thing in the custom display template …