2

We need to access metadata fields in our keywords. We realised that in the master branch of the dxa-web-application-java project, there's already a KeywordModel that will solve this issue in previous dxa versions. So we added the needed classes into our project.

However, when debugging I realised that we are not mapping the keyword info in our model because the extensionData is null. Do we need to upload the TBBs?

private String getMetadataSchemaId(Keyword keyword) {
            if (keyword.getExtensionData() == null ||
                    !keyword.getExtensionData().containsKey("DXA") ||
                    !keyword.getExtensionData().get("DXA").getContent().containsKey("MetadataSchemaId")) {
                return null;
            }

            return (String) keyword.getExtensionData().get("DXA").getContent().get("MetadataSchemaId").getValues().get(0);
    }
  • It does look like it depends on a change to the TBBs indeed. – Nuno Linhares Nov 17 '16 at 11:10
1

The DXA 1.7 story regarding KeywordModel is still in progress. Indeed, the Java implementation is not complete yet.

Furthermore, the story indeed also requires CM-side changes (see commits on the dxa-content-management repository).

Note that DXA 1.7 is scheduled for release end of this year.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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