Skip to content

Instantly share code, notes, and snippets.

@nafilimonov
Last active June 30, 2018 08:50
Show Gist options
  • Save nafilimonov/8c9454b8cf41f096ec08e151db4c9a82 to your computer and use it in GitHub Desktop.
Save nafilimonov/8c9454b8cf41f096ec08e151db4c9a82 to your computer and use it in GitHub Desktop.
Bitrix. Iblock. Путь к файлу из свойства
<?
foreach($arResult["ITEMS"] as $index => $arItem)
{
if (!empty($arItem["PROPERTIES"]["PHOTO_MAIN"]["VALUE"]))
{
$arResult["ITEMS"][$index]["PROPERTIES"]["PHOTO_MAIN"]["SRC"] = CFile::GetPath($arItem["PROPERTIES"]["PHOTO_MAIN"]["VALUE"]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment