3

I'm implementing DXA(STRI, SDL Tridion Reference Implementation). I cannot get keyword properties(ID,title, description,key and metadata) which is selected in component field.

When I defined a string property corresponds with a keyword field in model class, the property returns selected keyword's description. If it doesn't have description value, keyword's title is returned. My model class is following, where corresponding schema title is "Link", and keyword fields's name is "linkType".

namespace Sdl.Web.Site.Areas.Test.Models
{
    public class Link:EntityBase
    {
        public string LinkType { get; set; }
    }
}

How can I get keyword's other properties(ID, key and metadata)?

1 Answer 1

3

I don't think it's currently supported to get this information from the data that is published by the TRI (it publishes xml serialized by the same code that is used in DD4T.

If you would put this code

public Tag LinkType { get; set; }

you would get some more info, like the key and the taxonomy ID (getting more currently doesn't seem supported out of the box).

But, I think that with this information, you should be able to query the broker to get all information you would need.

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.