Accessing custom curator attributes
Managed by | Updated .
Background
You can add custom attributes to Curator rules through the Marketing Dashboard. This article will explain how to access these attributes from your FreeMarker template.
Process
Set up the custom Curator attributes you would like to use. Follow the steps in this link to create your custom fields: https://docs.funnelback.com/more/extra/ui_modern_curator_custom_fields_collection_cfg.html
Edit your Freemarker code. The below example will add a custom class to your Curator rule.
Add FreeMarker code to display the Curator rules and place the
exhibit.additionalProperties.class
in the desired tag:<#list (response.curator.exhibits)![] as exhibit> <#-- Skip best bets --> <#if exhibit.category != "BEST_BETS"> <#if exhibit.messageHtml??> <#-- Simple message --> <blockquote class="blockquote search-exhibit ${(exhibit.additionalProperties.class)!}"> ${exhibit.messageHtml?no_esc} </blockquote> <#elseif exhibit.descriptionHtml??> <#-- Rich message --> <div class="card search-exhibit ${(exhibit.additionalProperties.class)!}"> <div class="card-header"> <h4><a href="${exhibit.linkUrl!}">${exhibit.titleHtml!}</a></h4> </div> <div class="card-body"> <#if exhibit.displayUrl?? && exhibit.displayUrl != "-"><cite class="text-success">${exhibit.displayUrl}</cite></#if> <#if exhibit.descriptionHtml??>${exhibit.descriptionHtml?no_esc}</#if> </div> </div> </#if> </#if> </#list>
Other Uses
Additional properties can be set to do the following:
- Add unique IDs to each curator rule click to allow compatibility with Google tag manager
- Add positions to each curator rule to allow displays on different parts of the search results page
Was this artcle helpful?