How to add custom Block in Drupal 8, Drupal provides easy steps to create custom block with your required fields.
Let’s see – How to Create Custom Block in Drupal 8.
Step 1: login with Superadmin.
Step 2: go >> Structure >> Block layout >> Custom block library
After click on Custom block library
- Blocks: in this, you can use listed blocks.
- Block types: in this, you can add custom blocks with number of fields.
Select Block types Click on +Add custom block type for more detail see given Pic.
Step 3: After clicking on +Add custom block type, Add block information Title, Description and save.
Example: I created Block “My First block”.
Click on Manage fields Add fields. I added two fields title and my pic.
I have done custom block and how to Assign to second sidebar region and publish content.
Step 4: Go back >> click on Block Layout search Sidebar second (where you want to assign your custom block). >> click on Place block >> click on + Add custom block select your block write content and save.
Step 5: select options
- Content type – which content type you want to relate your block.
- Page – Put restricted.
- Roles – Select user permission.
- Regions – Select region where you published your block.
Save all settings.
After that open your article see result like article First Image.