2

There's a metadata schema linked with the page and we try to get from the View the value of the keyword associated to this page. However the information is empty. We are using Java DXA 2.0.1.

We have mapped in our customPageModel

public class PublicPagesPageModel extends DefaultPageModel {
     @SemanticProperty(propertyName = "p:sitemapKeyword")
     private KeywordModel sitemapKw;

However when accessing the keyword in the jsp page, the value is empty

${pageModel.sitemapKw.key}
1
  • Is that keyword category published?
    – Velmurugan
    May 20, 2019 at 7:38

1 Answer 1

1

Solved, the issue was that in the Tridion schema this field was defined as multivalue.

1
  • 1
    Good that you found the problem/solution yourself. However, if all is well, there should not be a problem with mapping a multi-valued CM field to a non-list property; it should just use the first value (and ignore any additional values). May 20, 2019 at 17:15

Your Answer

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

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