Meta Tag Template Configuration for Bitrix CMS
Meta tag templates — a mechanism for automatic generation of <title>, <meta name="description"> and <meta name="keywords"> for infoblock elements and sections based on their fields and properties. Alternative to manual filling of each element — which with a 10,000 product catalog is physically impossible.
Where It's Configured
Marketing → Search Engine Optimization → Meta Tags → Add Rule.
Rule is bound to specific infoblock and object type (sections or elements). Multiple rules can be created on one infoblock with different conditions (e.g., different templates for different sections).
Template Syntax
The template field uses substitutions of form #FIELD_CODE# and #PROPERTY_{CODE}#:
| Substitution | Returns |
|---|---|
#NAME# |
Element or section name |
#SECTION_NAME# |
Parent section name of element |
#IBLOCK_NAME# |
Infoblock name |
#PROPERTY_{CODE}# |
Property value with code CODE |
#PROPERTY_{CODE}_VALUE# |
Text value of list property |
#CODE# |
Element symbolic code |
#ID# |
Element numeric ID |
Example for catalog section:
Buy #NAME# wholesale and retail | Online Store
Example description for product:
#NAME# in online store. #PROPERTY_SHORT_DESCRIPTION# Delivery across the country.
Value Priority
Template is the default value. If specific element has SEO_META_TITLE, SEO_META_DESCRIPTION, SEO_META_KEYWORDS manually filled (available in element edit form in "SEO" tab), they are used instead of template.
Hierarchy for element:
- Manually filled SEO fields of element.
- Template rule for this infoblock and section.
- General template for all infoblock elements (not bound to section).
Integration in Site Template
Meta tags from seo module must be explicitly output in <head>. In template:
// In header.php before </head>
$oSeoPage = new \Bitrix\Seo\SitemapPage();
// or via standard call:
$APPLICATION->ShowHead();
Or explicitly via GetPageProperty:
<title><?= $APPLICATION->GetPageProperty('title') ?: $APPLICATION->GetTitle() ?></title>
<meta name="description" content="<?= $APPLICATION->GetPageProperty('description') ?>">
$APPLICATION->ShowHead() automatically outputs meta tags, canonical, og-tags if they were set by page components.
Template Debugging
If meta tags aren't applied:
- Check if
seomodule is enabled: Settings → Modules → Module List. - Check that infoblock has SEO optimization enabled in its settings: Content → Infoblocks → [infoblock] → SEO.
- Ensure detail page component calls
$APPLICATION->SetPageProperty()or usesbitrix:seo.meta. - Clear infoblock cache.
Implementation Timeline
Setting up meta tag templates for catalog (sections + elements) with properties consideration — 2–3 hours.







