4

I am adding folder metadata to component metadata using "Add inherited metadata to component". At DXA application end I can see it available inside component metadata but it is not mapping in DXA entity model. By using model field with [SemanticProperty("_all")] attribute, I am able to find all the metadata fields in the field. Can anyone tell me if it is possible to get it mapped in the model fields.

3

Yes! It is possible but need some customization on the DD4T template. DD4T template does not add the schema information (for folder and structure group metadata) in the presentation and because of that you are unable to map it properly with the DXA model. So to resolve that you have to add the schema information along with the metadata component by updating that DD4T template.

Or

As a work around you can add a component metadata schema with the same field name(Don't add any component there) which will resolve your issue for now.

Note: Remember this is just a workaround, if you want a solution then change the DD4T template as I mentioned earlier.

  • In general, you have to ensure that the "inherited" metadata fields are defined in your Schema. In case of Page metadata, ypu – Rick Pannekoek Oct 25 '16 at 17:48
  • Thanks Sayantan & Rick. +1 for both for quick responses. @Sayantan, can you please elaborate more on adding schema information along with the metadata component by updating that DD4T template. Here, my folder metadata schema has altogether different fields compared to component metadata schema fields. Can you give me an example or reference.. – Mukesh Kumar Oct 25 '16 at 18:01
2

You have to ensure that the "inherited" metadata fields are defined in the Schema.

In case of inherited metadata on Pages, you will also have to ensure that the Page has an associated metadata Schema (even if the Page itself doesn't have any metadata), because otherwise you end up with a Page with (inherited) metadata, but no metadata Schema (as Sayantan mentioned).

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.