Skip to content

Home · Blog · Outputting infoblock properties in 1C-Bitrix

Send a request

New format

Outputting infoblock properties in 1C-Bitrix

Infoblock properties (SKU, file, list, element link) live in the admin; on the site you output them in the component template — most often in the result’s `template.php`.

Below: how the `$arResult` array and display keys work. Exact syntax and API depend on Bitrix version and component type — check official docs and don’t copy 2017 snippets without testing on your project. You need basic PHP and HTML.

Share
Telegram

How output works

The infoblock component builds the element into `$arResult`. Properties for display often live in `$arResult['DISPLAY_PROPERTIES']['PROPERTY_CODE']`. An entry has a name and `DISPLAY_VALUE` (a prepared value or array of values).

You set the property code (called `ATTRIBUTE` in old notes) in the infoblock admin. In the template use your code — not someone else’s from an example.

Before editing the template:

  • property created and filled on the element
  • display enabled for list/detail if the component requires it
  • you work in a component template copy
  • clear cache after edits

Bitrix public section SEO in 1C-Bitrix

Practice

Before editing template.php

Template copy, not core.

0 / 6 done

Property types — different output

String and number often print as one `DISPLAY_VALUE`. A list can be single or multiple — then the value is an array you loop. A file is a download/view link. Element links need extra fetches of related element fields.

Don’t mix raw `PROPERTIES` and `DISPLAY_PROPERTIES` without understanding: the first is closer to DB data, the second to ready display.

Type → what to watch

Property typeIn practice
String / numberOne value in DISPLAY_VALUE
ListOne value or an array
FileLink / path to the file
Element linkIDs/data of related elements
HTML/textEscaping and allowed tags

Practice in the template

Typical frame: check the property key exists in `DISPLAY_PROPERTIES`, print the name if needed, then the value. For multiples — `foreach`. For a file — build a link from property data.

Comment and view counters are separate fields/modules, not always an “infoblock property.” Wire them only if the project actually uses those mechanisms.

“Not showing” debug checklist:

  • property code matches the admin
  • element is filled
  • correct template.php of the component on the page
  • cache cleared
  • edit/debug mode shows the right area

Test yourself

Mini quiz: infoblock properties

Two checks.

1 DISPLAY_PROPERTIES are needed to…
2 2017 output snippets…

What to avoid

Don’t edit files in `bitrix/modules` and don’t paste long code walls from 2015–2017 forums without understanding the version. After a core update those edits break.

Don’t dump 200 lines of business logic into the template — move it to result_modifier.php or a service layer if the project allows.

Link to content and SEO

Properties are handy for product specs, price-list files, badges. For SEO it matters more that needed fields land in visible HTML and meta templates — see the Bitrix SEO article.

An empty property “storefront” on the card is worse for users than a careful set of filled attributes.

Takeaways

Property output = component template + property code + value type. `DISPLAY_PROPERTIES` is the main display compass.

Check current Bitrix API; the public bar edits content but doesn’t replace template work.

FAQ

Where do you edit property output?

Usually in the needed component template (often `template.php` under `bitrix/templates/...` or the site template). Prefer a component template copy, not core edits.

What is DISPLAY_PROPERTIES?

An array of element properties prepared for display: name, value(s), type. Handy for card/list output.

Why is the property empty on the site?

Not marked for detail/list, wrong property code, cache, wrong component template, or the property isn’t filled on the element.

How is this different from the public-section bar?

The bar edits content visually. This piece covers the template and property output code by a developer.

Can you output properties without PHP?

Some properties show via built-in component parameters. Complex formats still need a template or custom code.

Pasting a 2017 Bitrix property snippet — and the card still shows empty fields?

We’ll wire DISPLAY_PROPERTIES in a template copy, match the property code and type, and clear cache so specs actually render.

Discuss the task