php - Drupal 8 How to create custom block in a theme -


i have created custom theme , added regions. want create , assign custom block regions. how can it?

as experimental purpose have created folder named 'blocks' in path /themes/custom_theme/templates , named block 'block--regionname.twig.html'. no hope. please advice. think i'm on wrong track.

if make "custom block" in template in theme, not available in block layout page in drupal site , can't place region.

you can create custom blocks in structure -> block layout -> add custom block. or can create custom module. these available in block layout page, , can place region. can define twig template block in custom module, , can write html it.

https://www.drupal.org/docs/8/creating-custom-modules/create-a-custom-block


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -