Use field for full entity display

Last updated on
1 January 2024

This documentation is deprecated.

Deprecated

This guide is considered deprecated! The use case for this guide can be better achieved with the Inline Formatter Display submodule of the Inline Formatter Field module. It is recommended to update the Inline Formatter Field module and enable the Inline Formatter Display submodule to control the full display on an entity.

Overview

Sometimes it is desired to control the full display of an entity type, which means either you have to create a twig template with the entity type trailing at the end (ie. node--my-content-type.html.twig), or you have to decouple your site and and work with all the data on the site.

This guide will show you a third option that is created by the inline formatter field module, displaying only the inline formatter field. <break>

How to

Step 0 - Make sure entity is set up

Before beginning make sure you have installed the Inline Formatter Field module, created your entity type, and have added all the needed fields.

For my example, I will create a content type call "My Content Type" with a body text and an media reference to an image media type as its two fields.

Step 1 - Add the inline formatter field to entity type

Now we need to add the inline formatter field. After adding the field, make sure to make the default value of the field to be checked.

Step 2 - Hide field from the form display

Set up the form how you would normally add it, but remember to move the inline formatter field to the disabled section. Because our display is always going to use this field we don't want authors to have the ability to uncheck the box, thus making the content not display anything.

Manage Form Tab

Step 3 - Manage display tab

Now we need adjust or entity display. Move everything except the inline formatter field to the disable section.

Manage display tab

Now open the inline formatter field settings and enter your desired format and save.

Formatter field settings input

Step 4 - Test it out

Now, you are ready to create your content and adjust the format until you get your desired output.

Help improve this page

Page status: Deprecated

You can: