What this solution does
The Top Man Digital: Open Graph module automatically adds Open Graph meta tags to website pages. This ensures links are displayed as cards with a title, description, and image when shared in social networks and messengers, including VKontakte, Telegram, WhatsApp, Odnoklassniki, and Viber.
The solution works out of the box. After installation, it automatically identifies the current element or section of an information block based on the SEF URL and inserts the correct tags. No modification of component templates is required for standard scenarios such as catalogs, news, or detail pages.
The module automatically retrieves data for standard components (catalog.element, catalog.section, news.detail, and other information block components) via the SEF address without requiring edits to result_modifier.php. A dedicated 'Open Graph' tab is added to the element and section editing forms, allowing content managers to set individual og:title, og:description, and og:image values directly without accessing the module settings.
Flexible hierarchy of data sources for Open Graph. A prioritized chain: manual values → infoblock fields → page properties (SetPageProperty) → calculated default values. The first source containing a value takes precedence.
Auto-fill. Automatically populates title from the element or section name, description from the text, and image from the image. This feature is enabled via a toggle switch, saving time on standard pages.
Default image with resizing. If a page lacks a specific image, a general default image is used with optional resizing to the required dimensions (for example, 1200×630 pixels for recommended previews).
Independent settings per site. A key feature for multi-site projects: each site has its own configuration for the Open Graph field list, additional meta fields, excluded pages, default image, auto-fill settings, and cache duration.
Additional meta fields. Beyond standard Open Graph tags, any custom fields can be output, such as fb:app_id, og:video, article:published_time, and others.
Page exclusion. Tags are suppressed from pages where the path matches an exact address or a regular expression.
Caching. Generated tags are cached with a configurable lifetime. Manual cache clearing is performed by adding the ?clear_cache=1 parameter to the URL while logged in as an administrator.
The module provides developers with seven extension points to manage Open Graph tags without modifying the core: OnBeforeAddOpenGraph, OnAfterAddOgFields, OnAfterAddIBlockFields, OnAfterAddPropFields, OnAfterAddDefault, OnAfterAdd, and OnBeforeOutput. These hooks allow flexible control over meta-data assembly during page generation.
This solution is suitable for online stores, news portals, corporate websites, and other projects where the appearance of page links during social media reposts is critical. The module is particularly valuable for multisite systems where each domain requires individual configuration of parameters.
General iT can install and configure this module and check how it works on your website.