Setting up meta tags using 1C-Bitrix templates

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

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:

  1. Manually filled SEO fields of element.
  2. Template rule for this infoblock and section.
  3. 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:

  1. Check if seo module is enabled: Settings → Modules → Module List.
  2. Check that infoblock has SEO optimization enabled in its settings: Content → Infoblocks → [infoblock] → SEO.
  3. Ensure detail page component calls $APPLICATION->SetPageProperty() or uses bitrix:seo.meta.
  4. Clear infoblock cache.

Implementation Timeline

Setting up meta tag templates for catalog (sections + elements) with properties consideration — 2–3 hours.