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
- Open the Admin homepage and choose Content on the sidebar. Next, under Elements, choose Blocks.
- In the top-right corner, click on Add New Block. Next, do the following:
- In Enable Block, set to Yes in order to turn on the Block, set to No to turn off the Block as well.
- In Block Title field, assign a block title for internal reference.
- In Identifier field, assign a unique identifier for the block. Remember to use all lower characters with underscores instead of spaces.
- For Store View field, select one where the block is purposed to be available.
- 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.
- 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!