Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

layout--onecol.html.twig

Same filename in this branch
  1. 11.1.x core/modules/layout_discovery/layouts/onecol/layout--onecol.html.twig

Theme override to display a one-column layout.

Available variables:

  • in_preview: Whether the plugin is being rendered in preview mode.
  • content: The content for this layout.
  • attributes: HTML attributes for the layout <div>.

File

core/themes/stable9/layouts/layout_discovery/onecol/layout--onecol.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override to display a one-column layout.
  5. *
  6. * Available variables:
  7. * - in_preview: Whether the plugin is being rendered in preview mode.
  8. * - content: The content for this layout.
  9. * - attributes: HTML attributes for the layout <div>.
  10. */
  11. #}
  12. {%
  13. set classes = [
  14. 'layout',
  15. 'layout--onecol',
  16. ]
  17. %}
  18. {% if content %}
  19. <div{{ attributes.addClass(classes) }}>
  20. <div {{ region_attributes.content.addClass('layout__region', 'layout__region--content') }}>
  21. {{ content.content }}
  22. </div>
  23. </div>
  24. {% endif %}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal