element

Table of contents

The element object is accessible in the elements/_element.plate theme file, if it’s rendered by the {% render_content %} tag inside the {% content_for column %} block. Read more on how content_for works here.

The elements/_element.plate usually calls the {% content_for element %} block, which renders the :plural_element_type_name/_singular_element_type.plate theme file, with access to the same element object. However, in this case calling the singular content type name returns the element object.

So, calling {{ element }} in elements/_element.plate returns the element object, and
calling {{ social_media_button }} in social_media_buttons/_social_media_button.plate returns the same element object.

element.content_type

Returns content_type object.

Need help?

Do you have any question which is not answered in this knowledge base? Contact us. We are here to help you.