etechflow / module-meta-templates
Rule-based meta title/description/keywords templates with variables for Magento 2.
Package info
github.com/etechflow/Etech-Meta-Templates
Type:magento2-module
pkg:composer/etechflow/module-meta-templates
Requires
- php: ~8.1.0||~8.2.0||~8.3.0||~8.4.0
- magento/framework: >=103.0
- magento/module-backend: >=102.0
- magento/module-catalog: >=104.0
- magento/module-cms: >=104.0
- magento/module-store: >=101.0
This package is not auto-updated.
Last update: 2026-06-06 08:53:00 UTC
README
Rule-based meta title / meta description / meta keywords templates for Magento 2, with {{variable}} placeholders resolved per page at render time. Part of the Etechflow SEO Suite.
Define a rule once (e.g. {{product.name}} | Buy at {{store.name}}) and it applies across every matching product, category, or CMS page — no per-product editing.
Features
- Template rules for
product,category, andcms_pagepages. {{object.attribute}}variables with optional fallback:{{product.brand|Genuine Part}}.- Any attribute is available —
{{product.color}},{{product.<any_code>}}, dropdown labels resolved automatically. - Scoping: per store view + optional "limit to category ID" for product rules.
- Priority: highest-priority matching rule wins.
- Two modes: Fill empty (never overwrites meta a product/category already has) or Override (always applies).
- Title-safe: applies the title via an
afterGetplugin so it wins even when another extension also sets it. - Admin grid + add/edit form under Marketing → Meta Templates. Master switch + mode under Stores → Configuration → Etechflow → Meta Templates.
Variables
| Object | Variables |
|---|---|
| Product | {{product.name}}, {{product.sku}}, {{product.price}}, {{product.category}} (deepest), {{product.<attribute_code>}} |
| Category | {{category.name}}, {{category.description}}, {{category.<attribute_code>}} |
| CMS | {{cms.title}} |
| Store | {{store.name}}, {{store.url}} |
Fallback syntax: {{variable|fallback text}} — used when the variable resolves to empty.
Install
composer require etechflow/module-meta-templates
bin/magento module:enable Etechflow_MetaTemplates
bin/magento setup:upgrade
bin/magento setup:di:compile # production mode
Configure
- Stores → Configuration → Etechflow → Meta Templates — set Enable = Yes and choose Apply mode.
- Marketing → Meta Templates — Add New Template: name, applies-to, store view, optional category limit, priority, and the meta title / description / keywords templates.
How it works
- A frontend plugin on
Magento\Framework\View\Result\Page::renderResultresolves the matching rule for the current page and sets the description + keywords viaPageConfig. - A second plugin on
Magento\Framework\View\Page\Title::getreturns the templated title at read time, so it is authoritative. Service/VariableProcessorperforms the{{...}}substitution;Service/MetaResolverpicks the matching rule (type + store + category + priority) and honours the fill-empty / override mode.
License
Proprietary — © eTechFlow.