Search code examples
tridiontridion-content-delivery

How should I use keyword metadata?


In addition to a name, key, value, and relationships to other keywords, a keyword itself can have metadata. This allows the author to add additional information by selecting a metadata schema to then add whatever:

  • text
  • selections (text with options or a Category)
  • links
  • etc

SDL Tridion Keyword Metadata

SDL Live Content describes how to retrieve Keyword properties. Given a keyword, myKeyword, we can get myKeyword.KeywordMeta.NameValues as name-value pairs (dictionary).

I can see the use case would be in presentation server-side code, .NET or Java developers could get additional information for a given keyword.

I understand keywords as an option to categorize components and provide options for authors to select in other fields. In most cases where I'd want fields, I'd suggest a component, but want to make sure I understand how we should use keyword metadata and any programmatic restrictions.

  • For SDL Translation Manager, would keyword metadata be translatable? It looks like keywords themselves are translatable as part of a Category (and individual keywords depending on your version*). We can of course localize keywords without Translation Manager.
  • Does keyword metadata apply in the Content Manager? Would you use this in C# TBB's for example?

Update for others wondering: Be sure to check your version of SDL Tridion and SDL Translation Manager -- Lars pointed out that SDL Translation Manager version 3.0 does have single keyword translation ability. Chris noted behavior in GA. When in doubt, check the docs or confirm in your setup.


Solution

  • With regards to metadata I always consider it as "data about data", hence I wouldn't use it directly for content purposes, the only exception to this for me is metadata on a multimedia component (since you don't have regular content fields there). But then looking at keywords I think this could at some point be the other exception to my rule.

    If you build up your navigation based on keywords, there is a use case for additional data, including (translatable) content. The metadata of keywords is translatable through translation manager, but it is not sent forward to the broker if I recall correctly. So to use it, you would have to store it as a sitemap page for instance (writing the keyword metadata through a template/C# TBB in a page).