From 60b0b52ff5043771c7a9ce406b419219fed32a2e Mon Sep 17 00:00:00 2001 From: Jacek Tomaszewski Date: Sun, 14 Mar 2021 14:41:14 +1100 Subject: [PATCH] feat: Show brand description on brand page --- Block/View.php | 28 +++++++++++++++++++ view/frontend/layout/brands_index_index.xml | 2 ++ .../templates/brand/description.phtml | 12 ++++++++ 3 files changed, 42 insertions(+) create mode 100644 Block/View.php create mode 100644 view/frontend/templates/brand/description.phtml diff --git a/Block/View.php b/Block/View.php new file mode 100644 index 0000000..24c8adc --- /dev/null +++ b/Block/View.php @@ -0,0 +1,28 @@ +registry = $registry; + parent::__construct($context, $data); + } + + /** + * @return \MageSuite\BrandManagement\Model\Brands + */ + public function getBrand() + { + return $this->registry->registry('current_brand'); + } +} diff --git a/view/frontend/layout/brands_index_index.xml b/view/frontend/layout/brands_index_index.xml index 5fb44e6..d49b104 100644 --- a/view/frontend/layout/brands_index_index.xml +++ b/view/frontend/layout/brands_index_index.xml @@ -10,6 +10,8 @@ + + diff --git a/view/frontend/templates/brand/description.phtml b/view/frontend/templates/brand/description.phtml new file mode 100644 index 0000000..12592be --- /dev/null +++ b/view/frontend/templates/brand/description.phtml @@ -0,0 +1,12 @@ + +getBrand() ?> +getFullDescription()): ?> +
+ helper('Magento\Catalog\Helper\Output')->categoryAttribute($brand, $description, 'description') ?> +
+