我需要在名称为catalog.list
的组件中显示目录描述。
未在此组件中指定$arResult["DESCRIPTION"]
。$arResult
中有一份货物清单。
如何强制组件请求目录DESCRIPTION
?
页面上没有catalog.section
组件(它有$arResult["DESCRIPTION"]
),因为我使用的网站模板缺少很多功能。
您可以在组件模板目录中使用result_modifier.php
。添加
$res = CIBlockSection::GetByID($_GET["GID"]);
if($ar_res = $res->GetNext())
$arResult['DECRTIPTION'] = $ar_res['DECRTIPTION'];
更多信息:https://dev.1c-bitrix.ru/api_help/iblock/classes/ciblocksection/getbyid.php
享受吧。