Setting up triggers in trigger-type.xml is done as below

<trigger-type basetype="text" url-param="search_productcategory" name="Product – Category">
    <list-of-values multiselect="true">

Here SmartTarget UI will display these two triggers as below


Is there any way to show a display value in the SmartTarget UI, like we used to do in simple dropdowns on website?

For example:

  • "Radio" instead of "C1"
  • "WalkMan" instead of "C2"
  • etc.

It is possible, although not as easy as one might have hoped. You will need to use the localization service from Fredhopper to assign these "user friendly labels" to each value.

SmartTarget does this for some triggers, like the Segments from Audience Manager (which are really URIs but are displayed using the Title of the Segment).

The process is rather involved, but there is a helper class available in the SmartTarget Java API that greatly simplifies the process: LocalizationHelper (in the com.tridion.smarttarget.utils package). Feel free to use that one to add your labels. You are responsible for keeping the labels up-to-date, though, if the titles change :)

  • Thanks Peter, We are creating custome triggers directly in trigger-type.xml by modifying it on the fly. So is there no way to set that localization in trigger-type.xml. Or any way to do that using .Net API? Jun 24 '15 at 6:52
  • The localization labels are stored in different files so you cannot specify them in trigger-types.xml. It's also got some caveats as to how you escape the values and such. You can always try using the Fredhopper REST services directly, but I don't know if there is any documentation about it. We did not expose the helper in the .NET API. It was actually only meant to be used internally, but has turned out to be useful for cases like this. Jun 26 '15 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.