P
P
photosho2017-07-17 13:03:37
1C-Bitrix
photosho, 2017-07-17 13:03:37

Is it possible to pass own parameters when calling a component?

An interesting question arose: is it possible in Bitrix to somehow pass its parameters when calling components? Such an opportunity would be very useful at the stage of building templates, when you need the same template to look a little different depending on certain conditions. In those cases when it is easier and more correct to put a condition in the template for checking by the value of the parameter than to produce separate templates.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Nikolaev, 2017-07-17
@photosho

The component has strictly defined parameters in .parameters.php, but every template that exists has the same file that completes the parameters of the component.
Those. if you create your own template, then you can specify additional parameters. See - /bitrix/components/bitrix/menu/templates/catalog_horizontal/.parametes.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question