Blog Setup for 1C-Bitrix
Blog module in Bitrix (blog) — one of oldest subsystems, existing since early versions. Stores posts in b_blog_post table, comments in b_blog_comment, blogs themselves in b_blog. Module works, but in typical projects blog usually implemented on iblocks: simpler setup, more flexible customization, familiar to developers. Let's examine both options and typical setup tasks.
Module blog vs. iblock
Module blog provides ready components: blog.post.list, blog.post.view, blog.post.edit, blog.post.comment. Out of box — authorship, tags, comments with moderation, RSS. Cons: outdated edit interface, rigid structure, template customization complexity.
iblock — create information block "Blog" type content. Properties: PREVIEW_PICTURE, DETAIL_PICTURE, PREVIEW_TEXT, DETAIL_TEXT, TAGS (string or reference to glossary), AUTHOR (user reference), READ_TIME (number, reading minutes). iblock sections — blog rubrics.
Output — via standard news.list and news.detail with custom templates. Comments — via separate module (Forum, third-party like Disqus) or custom realization on iblock.
For most corporate sites iblock — right choice. Module blog justified if need multi-author blogs with independent publication (each user leads own blog).
iblock Setup
Create iblock in Content → iblocks. Type — content (or separate blog type). API-code — blog. Site binding mandatory.
In URL-templates set SEO-friendly URLs:
- List:
/blog/ - Section (rubric):
/blog/#SECTION_CODE#/ - Detail page:
/blog/#SECTION_CODE#/#ELEMENT_CODE#/
Section and element code set on creation. For SEO use transliteration: enable in iblock settings Transliterate symbolic code from name on element add.
Components for public part:
-
bitrix:news— complex component combining list and detail. Or separate:news.list+news.detail— more convenient with complex templates. - Pagination —
NAV_TEMPLATEparameter. - Tag filtering — via
FILTER_NAMEwith GET-parameter transmission.
SEO Settings
For each blog element important: title, description, canonical URL. In iblock settings set SEO-field templates:
- META TITLE template:
{=this.Name} | Company Blog - META DESCRIPTION template:
{=this.PreviewText}
For OpenGraph tags (og:title, og:image, og:description), use $APPLICATION->SetPageProperty() in news.detail template or via element properties.
Sitemap — add blog section to SEO module settings (Marketing → SEO → Site Map). Specify iblock and update frequency.
Caching
Components news.list and news.detail cache natively via CACHE_TIME parameter. For blog with rare posts set 3600 seconds. When new post added, list cache automatically clears via tagged cache — Bitrix adds tag iblock_id_{N} on iblock selection.
Composite cache — blog usually contains no personalized data (except comments), so pages fully cached. Comments block moved to dynamic area via \Bitrix\Main\Page\Frame.
Common Improvements
Reading time — calculated on element save. Handler OnAfterIBlockElementUpdate counts words in DETAIL_TEXT and divides by 200 (average reading speed). Result written to READ_TIME property.
Related articles — property type "Element binding" or automatic selection by tag match. Output in news.detail template via additional news.list with filter by current article tags.
Subscribe to new articles — via sender module mailing or integration with external service (Mailchimp, Unisender).







