Answer the question
In order to leave comments, you need to log in
Bitrix. How to pass the result of the component to the header.php of the template?
I ask you not to kick much) In php, and even more so in Bitrix, there is a complete zero, but they asked for help.
In the template.php of the smartfilter component, there is a variable $x (string) where the result of the component is placed.
Is it possible to somehow put this $x variable into a global object (or something else) to use it in the header.php of the template?
Answer the question
In order to leave comments, you need to log in
In header.php:
In the template.php of the smartfilter component:
$arResult['VAR_X'] = $x;
// some code
$this->__component->setResultCacheKeys(array('VAR_X'));
$APPLICATION->AddViewContent('var-x', $arResult['VAR_X']);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question