Get CMS Block Collection in Magento 2.

You can get all the CMS Static Blocks collection in Magento 2 by calling interface, Magento\Cms\Api\BlockRepositoryInterface.

Magento\Cms\Api\BlockRepositoryInterface used for getting CMS Static Blocks related data in Magento 2.

BlockRepositoryInterface is used when you need to fetch a collection of CMS Static blocks or get specific CMS static block data. You can get Specific Blocks data by Identifier using  Get Cms Blocks data by an identifier.

Continue reading “Get CMS Block Collection in Magento 2.”

Get CMS Static Block collection by identifier in Magento 2.

You can get CMS Static Blocks collection by an identifier in Magento 2 by calling BlockRepositoryInterface interface.

Magento\Cms\Api\BlockRepositoryInterface used for getting CMS Static Blocks in Magento 2.

BlockRepositoryInterface is used when you need to fetch a collection of CMS Static blocks or get specific CMS static block data.

Continue reading “Get CMS Static Block collection by identifier in Magento 2.”