diff --git a/Block/Html/TopMenu.php b/Block/Html/TopMenu.php index 03e18e7..e744910 100644 --- a/Block/Html/TopMenu.php +++ b/Block/Html/TopMenu.php @@ -94,8 +94,11 @@ public function getCategoryUrl($category) */ public function getCmsMenu($category) { + $block = null; $blockId = $category->getData('cms_block_menu'); - - return $blockId ? $this->blockRepository->getById($blockId)->getContent() : null; + if ($blockId) { + $block = $this->blockRepository->getById($blockId); + } + return ($block && $block->getData('is_active')) ? $block->getContent() : null; } }