etechflow / module-meta-templates

etechflow/module-meta-templates

Rule-based meta title/description/keywords templates with variables for Magento 2.

magento2-module Compatibility: 2.4.7-2.4.8 Code Quality: Fail Tests: N/A Security: Pass proprietary

Etechflow_MetaTemplates

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, and cms_page pages.
  • {{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 afterGet plugin 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

  1. Stores → Configuration → Etechflow → Meta Templates — set Enable = Yes and choose Apply mode.
  2. Marketing → Meta TemplatesAdd 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::renderResult resolves the matching rule for the current page and sets the description + keywords via PageConfig.
  • A second plugin on Magento\Framework\View\Page\Title::get returns the templated title at read time, so it is authoritative.
  • Service/VariableProcessor performs the {{...}} substitution; Service/MetaResolver picks the matching rule (type + store + category + priority) and honours the fill-empty / override mode.

License

Proprietary — © eTechFlow.

Changelog

All notable changes to this module are documented here.

v1.0.0 — 2026-06-05

Initial public release.

Rule-based meta title/description/keywords templates with {{variable}} placeholders. Admin rule grid with conditions, per-store-view, dry-run preview.

Versions
Version Stability QA Status Compatibility Released
1.0.6 stable Fail Magento 2.4.7-2.4.8 Details 2026-06-15 10:46:52
1.0.5 stable Not tested Not yet tested Details 2026-06-15 09:28:32
1.0.4 stable Not tested Not yet tested Details 2026-06-12 11:39:48
1.0.3 stable Not tested Not yet tested Details 2026-06-12 10:15:22
1.0.2 stable Not tested Not yet tested Details 2026-06-12 09:10:16
1.0.1 stable Not tested Not yet tested Details 2026-06-11 13:45:40
1.0.0 stable Not tested Not yet tested Details 2026-06-05 10:28:20

Requires 6

Package Constraint
magento/framework >=103.0
magento/module-backend >=102.0
magento/module-catalog >=104.0
magento/module-cms >=104.0
magento/module-store >=101.0
php ~8.1.0||~8.2.0||~8.3.0||~8.4.0

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 Pass not tested

Code Quality

Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge — a phpcs finding can't make a module incompatible.

Static analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

Static analysis results
Tool Status Findings Summary
PHPCS Fail 59 1 error, 58 warnings (ruleset: Magento2) — 4 auto-fixable with phpcbf
PHPMD Warning 15 15 rule violations (UnusedFormalParameter:4, NPathComplexity:4, CyclomaticComplexity:3, EmptyCatchBlock:3, ExcessiveClassComplexity:1)
Cpd Pass 0
Composer validate Info 6 valid; 6 advisory notes (composer validate --strict)

PHPStan

Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases. Cell → details modal.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 14 14
2.4.8 14 14
2.4.9 14 N/A

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Integration tests

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Security

Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.

Security results
Tool Status Findings Summary
Composer audit Pass 0
Malware scan Pass 0
License
proprietary

More from etechflow

View vendor
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.