Get cms block by identifier – Magento 2
3 years ago
For that, you can use Magento\Cms\Api\GetBlockByIdentifierInterface. No need to use Magento\Framework\Api\SearchCriteriaBuilder. /** * @var \Magento\Cms\Api\GetBlockByIdentifierInterface */ private $blockByIdentifier; public function __construct( GetBlockByIdentifierInterface $blockIdentifier ) { $this->blockByIdentifier = $blockIdentifier } Now you can get that page data passing blockIdentifier and storeId. $this->blockByIdentifier->execute($blockIdentifier, $storeId);

