Answer the question
In order to leave comments, you need to log in
How to set an output condition for $arSection?
Good afternoon everyone! Please tell me how to make a condition for the output <?echo $arSection["~UF_CATALOG_HTML"];?> The problem is that a smart filter is installed on the site. And on each city filter page, UF_CATALOG_HTML is duplicated - seo text for the page. I need to set a condition so that the seo text is displayed only if I didn't set the bottom description in the smart filter (<?$APPLICATION->ShowViewContent('sotbit_seometa_bottom_desc');//display the bottom description?>).
How it looks like so far:
<div class="seo-box expandable">
<?$APPLICATION->ShowViewContent('sotbit_seometa_bottom_desc');//вывод нижнего описания?>
<?echo $arSection["~UF_CATALOG_HTML"];//вывод сео текста?>
</div>
Answer the question
In order to leave comments, you need to log in
Try like this:
<div class="seo-box expandable">
<?
if($APPLICATION->GetViewContent('sotbit_seometa_bottom_desc')){
$APPLICATION->ShowViewContent('sotbit_seometa_bottom_desc');//вывод нижнего описания
}else{
echo $arSection["~UF_CATALOG_HTML"];//вывод сео текста
}
?>
</div>
Describe in more detail what needs to be checked. I can immediately suggest only if
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question