0

I am creating one drupal 8 theme based on bootstrap framework, for banners I created one custom block, named as 'Homepage banner', without creating any region, how to display this on my homepage template 'page--front.html.twig'.

1 Answer 1

0
  1. Install the twig tweak module

  2. Insert the following code in your page--front.html.twig

    {{ drupal_entity('block_content', 1) }}
    

Where "1" is the block id. You can see the block ID when you edit the custom block, it's in the URL - E.g. my-drupal-site.com/block/1

1
  • 1
    Thanks @100pic, it worked :) :) Commented Oct 17, 2019 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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