1

We are using Category and Keyword to display a drop down to author while putting content in component.

Now in TBB we can get value of selected keyword. But as per requirement We want to give userfriendly text in Value section of Keyword and someother text in Key section so that Author can select option based on Value and I can use key for development purpose.

How can we get Key based on the value of keyword in DWT TBB?

1 Answer 1

1

Well, getting a key of a keyword (selected in a component field) in DWT is not straight forward. You would need to create a custom function to achieve this.

If your templating solution allow, I'd say to try Razor Mediator or C# TBB, where you get the field value as a Keyword object and you can get the key by using keywordObject.Key.

Alvin asked the same question here and got some good answers. Please have a look, it could be useful to you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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