On this page
How-to display ConfigPage
Imagine that you've created ConfigPage to handle site header settings which content editor should be able to change easily (like display logo, choose a menu, show/hide language switcher etc). How should you build your header in this case?
Place block with ConfigPage
You always can make a custom block or use blocks provided by Drupal and in preprocess get a ConfigPage entity with required settings. But, there is another way to do it, use a block "ConfigPages Block" provided by the module. Just go to Block layout page (/admin/structure/block) or panel content page and choose a ConfigPages Block from list.
In block settings, you can select which ConfigPage should be rendered and which view mode will be used for that.
Manage View modes
As you know, View modes are quite helpful in the content management. You are able to change settings, appearance or whatever of displayed fields.
You can easily create, change or update View modes for ConfigPage in the same way as for other entities. Visit the 'View modes' page (/admin/structure/display-modes/view) and create new view mode.
Once view mode was created and enabled it can be configured on the ConfigPage setting page.
You can setup settings, formatters, order of displayed fields.
Thus you can create any amount of View modes and use them in the different places.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion