content_element - Twig Function
Info
This feature is available in Contao 5.2 and later.
The content_element function renders a content element.
To render a content element that already exists in the database (similar to the {{insert_content::*}} insert tag) you
can pass its ID:
You can also override the data for an existing content element:
You can also render a content element on the fly by passing the type of the content element and the configuration:
You can also pass an existing fragment reference. This is used in the element_group content element for example.
Arguments
typeOrId: Either the type of a content element, the database ID of an existing content element or a fragment reference.data: The data for the content element to be rendered. You can also use this to overwrite the configuration of an existing content element.