Skip to content

Model Service (R2) ComponentTemplate missing from DCP(s) #3

@Vouzamo

Description

@Vouzamo

When you have a DCP on a page, the preview just has an id reference in the EntityModelData in the form "[component item id]-[template item id]".

This makes sense and I understand the purpose of normalizing the model.

However, when I get the published Page from the model service it replaces the reference with EntityModelData to save me a round trip to the database but doesn't include the ComponentTemplate so I can't access the template metadata.

Also, ExtensionData for Target Group Conditions is not present when a Component Template is flagged as a DCP even when checked to be embedded on a Page using a dynamic assembly.

This prevents Target Group Conditions being evaluated at presentation time as there is no way to retrieve them.

It seems as if an EntityModelData should still expose ComponentTemplate and ExtensionData regardless of whether the associated Component Template is a DCP or not. It is only really the Content property I would have anticipated being omitted for a DCP.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions