Creating dynamic labels within SDL Tridion content

SDL Tridion GUI Extension

What we have is a new item called ‘Tag Selector‘ in the Format tool bar, allowing a user to select the dynamic variable they wish to enter into the content.

Selecting the button provides a user with a pop-up, where the user can select a keyword from a drop-down list:

Selecting and clicking a value from the drop down places a special ‘code’ into the content of the users rich-text field:

 

The drop-down list items are actually Keywords stored within a Category within the CMS, this means that the content editors have full control of the items that are available within the list.   A typical keyword looks like this:

The Keyword Value is the item shown in the drop-down, the Description is the text that is placed into the rich-text field for the user.

The GUI extension isn’t really mandatory if your user is comfortable with entering special codes into the content, but is a very nice to have to ensure no mistakes are being made.  This is on my ‘to share list’ and will most likely require a separate post to talk through how it was created and configured.

3 thoughts on “Creating dynamic labels within SDL Tridion content

  1. Nice! The biggest gotchas I see when making extensions is that users expect all the Tridion functionality to apply. Where Used should work, but also BluePrinting and localization, Content Port between systems, the security model (users are not admins), and especially item changes need to work going forward.

    Using Tridion’s keywords lets us update their display names and you have a way to make Where Used work. You can even localize these if needed. The customer should be careful with changing the inserted values, but I’m sure you’ll have a follow up post when they ask to change $$some_value$$ to $$some_new_value$$ everywhere. :-)

    Minor point: I’d consider swapping key and description, but otherwise looks great. Where can we show you some love on StackOverflow?

  2. @Alvin – You can show me some love by going and upvoting everything i ever did on SO :)http://stackoverflow.com/users/1221032/johnwinter

    In terms of a user localising / changing this information you’re right. It would probably have been better to use a keyword key as this can’t be changed, but thebusiness users wish to have this localisation flexibility. They are a good team though, so i’m not too worried here :)

  3. Very Nice. Thanks.
    I’m interested in how can this be extended to display different labels according to visitor’s context (claims in ADF). e.g.: visitors from UK will see price in pounds (£).
    I’m not that familiar with SmartTarget but it does not seem to easily fit since SmartTarget uses Regions as placeholders for content and I don’t think it is feasible to embed regions within a rich text field.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>