使用Bitrix在另一个组件中显示车间目录描述


Show shop catalog description in another component using Bitrix

我需要在名称为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

享受吧。