Features of Blocks and How to Add a New Block in Magento 2Add heading

Features of Blocks and How to Add a New Block in Magento 2

Posted by

Features of Block in Magento 2

In Magento 2, a block is considered as a modular unit of content which can be freely placed in the different positions on the page. Content blocks are used to refer to things as static blocks or CMS blocks and show fixed information like text, images, embedded video as well as dynamic information from a widget, original database or other sources. Most components existing on the home page are blocks that can be easily configured and managed.

By writing and code and assigning them to appear in a specific place on the page layout, you completely can create your own custom blocks of content. Also, you can define and position blocks by making a layout update in XML code.

Furthermore, the blocks that you customize can be added to any page, group of pages and another block as well. If you wanna know how to add new blocks in Magento 2 platform, please take attendant below to get more information!

The Way To Add New Blocks in Magento 2

  1. Open the Admin homepage and choose Content on the sidebar. Next, under Elements, choose Blocks.
  2. In the top-right corner, click on Add New Block. Next, do the following:
  1. In Enable Block, set to Yes in order to turn on the Block, set to No to turn off the Block as well.
  2. In Block Title field, assign a block title for internal reference.
  3. In Identifier field, assign a unique identifier for the block. Remember to use all lower characters with underscores instead of spaces.
  4. For Store View field, select one where the block is purposed to be available.
  5. In order to complete the block Content, comply the following:
  • Use the editor to format text, create links and tables, images video and audio.
  • Or to work with the HTML code, choose Show/Hide Editor.
  1. When complete, click on Save Block button to finish.

The new block displays at the bottom of the list in the Block grid.

If you find it helpful for you, please Like, Share and Subscribe to keep updating for more coming blogs!

Leave a Reply

Your email address will not be published. Required fields are marked *