0

How do I add a custom region in the bootstrap theme using Drupal 8? I have installed a bootstrap theme and now I want to add a custom region before Header region. Want to know how to add in theme.info and how to render in page.tpl

1
  1. In your sub-theme's .info.yml file add the new region alongside the existing ones, e.g.

    regions:
      header: Header
      content: Content
      sidebar_first: 'Sidebar first'
      footer: Footer
      custom_region: 'Custom region'
    
  2. Then in your page.html.twig file render it like so:

    {{ page.custom_region }}
    
  3. Visit the Block layout admin page and assign some blocks to the region so it displays on the page.

  • Exactly, sir, it's working finally. – Shakil Ahmad Sep 27 '17 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.