We have created a custom page model in order to get the metas of the SG in our page. The PageModelData contains the values in the field metadata. But when mapping to our customPageModel class, we don't get this information mapped. We are using Java version of DXA 2.0
@Data
@SemanticEntities({
@SemanticEntity(entityName = "WebExtraPage", vocabulary = SDL_CORE),
@SemanticEntity(entityName = "StructureGroupProperties", vocabulary = SDL_CORE, prefix = "sgp")})
public class WebExtraPageModel extends DefaultPageModel {
@JsonProperty("Metadata")
protected Map<String, String> metadata = new HashMap<>();
@SemanticProperty("sgp:brand")
private String brand;
}
We have tried both approches, but none works. We have read the documentation but it's uncomplete and the class doesn't exist.
This is the debugging value of the structures when building the page Model (buildPageModel)