Following is the annotation provided for a custom block plugin

/**
 * Provides a 'ChatButtonBlock' block.
 *
 * @Block(
 *  id = "chat_button_block",
 *  admin_label = @Translation("Chat Button"),
 * )
 */

module name is foo_chat.

When the block exposed by the above plugin is placed in a region, then how can i create this plugin specific twig template?

The closest i could get was in using block--foo-chat.html.twig which will apply for all the blocks created using the module foo_chat.

I have tried the following,

  1. block--foo-chat--chat-button-block.html.twig
  2. block--foo-chat--chatbutton.html.twig

The reason why i tried chatbutton was because the actual block is availabe for configuration at http://www.example.com/admin/structure/block/manage/chatbutton


NOTE: block--chatbutton.html.twig is recognized.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.