How to render a block in a template? I installed the module "Shariff Social Media Buttons" for "Drupal 8" :

https://www.drupal.org/project/shariff


This module once installed, add a block in :

/admin/structure/block


I want to display this block in a template :

https://www.drupal.org/docs/8/modules/twig-tweak/rendering-blocks-with-twig-tweak

I tried with the following code :

{{ drupal_entity('block', shariffsharebuttons) }}


But the block does not work (it is not rendered on my page)





drush ev 'print_r(\Drupal::configFactory()-&gt;listAll("block.block."));'
you can use Twig Tweak Module, will gives you twig extension called drupal_blockand you can render your block like the following :

{{ drupal_block('shariff_block') }}


Take a look to the module Cheat sheet for more info.

Note : Shariff Module provide block with the id shariff_block not shariffsharebuttons.