← All modules

Magento 2 module

CMS Block Meta Data

Adds meta title, meta keywords and meta description fields to CMS blocks and applies them to the page on which the block is shown as a widget.

Magento lets you maintain meta data for CMS pages, products and categories, but not for CMS blocks. If a page is mainly built from a CMS block, for example a landing page that only places a block through a widget, its title and meta tags cannot be controlled from the block itself. This module adds a “Search Engine Optimization” section to the CMS block form. When the block is placed on a page with the CMS Static Block widget, the meta data of the block is used for that page.

Features

  • New collapsible “Search Engine Optimization” section in the CMS block edit form with the fields “Meta Title”, “Meta Keywords” and “Meta Description”.
  • When a block with meta data is shown on the storefront through the CMS Static Block widget, the page title, meta keywords and meta description of the page are set from the block.
  • Empty fields are ignored, so the page keeps its own values for everything you leave blank in the block.

Configuration

There are no settings. Open a block under Content > Elements > Blocks and fill in the fields in the “Search Engine Optimization” section. The new fields are available right after installation.

Good to know

  • The meta data is only applied when the block is inserted as a widget. Blocks that are placed by the theme layout are not affected.
  • If several blocks with meta data are placed on the same page, the values of the last block processed are used.

Installation

Install the module with Composer in your Magento root directory:

composer require infrangible/m2-cms-block-meta-data

Then enable it and update the store as described in the installation guide. Composer installs the required modules listed on this page automatically.