Custom region in Barrio

Created on 15 October 2018, over 5 years ago
Updated 23 September 2023, 9 months ago

Is it possible to add your own custom regions as in a classic theme?

In this case page.sub_featured

mysubtheme.info.yml

regions:
  top_header: 'Top Header'
  top_header_form: "Top Header Form"
  header: Header
  header_form: "Header Form"
  primary_menu: 'Primary menu'
  secondary_menu: 'Secondary menu'
  page_top: 'Page top'
  page_bottom: 'Page bottom'
  banner: 'Banner'
  highlighted_top: 'Highlighted Top'
  highlighted: Highlighted
  featured_top: 'Featured top'
  breadcrumb: Breadcrumb
  content: Content
  sidebar_first: 'Sidebar first'
  sidebar_second: 'Sidebar second'
  content_bottom_first: 'Content Bottom First'
  content_bottom_second: 'Content Bottom Second'
  featured_bottom_first: 'Featured bottom first'
  featured_bottom_second: 'Featured bottom second'
  featured_bottom_third: 'Featured bottom third'
  sub_featured: 'Sub featured'
  footer_top_first: 'Footer Top First'
  footer_top_second: 'Footer Top Second'
  footer_first: 'Footer first'
  footer_second: 'Footer second'
  footer_third: 'Footer third'
  footer_fourth: 'Footer fourth'
  footer_fifth: 'Footer fifth'
  sub_footer_first: 'Subfooter First'
  footer: 'Footer'

/templates/_page.html.twig

{% if page.sub_featured %}
        <div id="mainextend" class="{{ container }}">
            <div class="sub-featured">
              {{ page.sub_featured }}
            </div>
        </div>
{% endif %}
💬 Support request
Status

Closed: outdated

Version

5.5

Component

Code

Created by

🇫🇷France citywizz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India ravi kant Jaipur

    I try to debug by installing Bootstrap Barrio 5.5.12 and find below solution.

    if page template of sub-theme will rename as _page.html.twig to _page.html.twig and region render inside Twig blocks then issue is solving.

  • Status changed to Closed: outdated 9 months ago
  • 🇵🇪Peru hatuhay Lima
Production build 0.69.0 2024