tridion-sites-extensions-api-docs

Home > @tridion-sites/models > ComponentPresentation

ComponentPresentation class

Essentially a combination of a Component and a Component Template.

Signature:

export declare class ComponentPresentation

Constructors

Constructor Modifiers Description
(constructor)({ backendModel, component, componentTemplate, conditions })   Constructs a new instance of the ComponentPresentation class

Properties

Property Modifiers Type Description
_backendModel   BackendComponentPresentation  
component   Link | undefined  
componentTemplate   Link | undefined  
conditions   ReadonlyArray<TargetGroupCondition> | undefined If conditions are specified for a Component Presentation, these are published as TCDL code. This TCDL code results in Content Delivery code that only renders the Component Presentation if the user falls in the given Target Groups.
getInternalModel   () => BackendComponentPresentation