Renders an attribute value of a CMS object to a DOM element. The content can be edited by a logged-in Scrivito user.
Props
attribute
(String
) – the name of the attribute to be rendered.content
(Obj
,Widget
) – the page or widget holding the attribute.tag
(String
) (optional) – tag name of the DOM element. Default:div
- [New in 1.34.0 (BETA)]
dataContext
(Obj
,DataItem
) – a CMS object or aDataItem
to be used as a data context for all child components of thisContentTag
. The correspondingDataItem
can be obtained in any of the child components viaScrivito.useDataItem
. If a child components itself uses aContentTag
with thedataContext
property, it will override any previously specified data contexts.
Other props are rendered as HTML attributes of the resulting tag.