Answer the question
In order to leave comments, you need to log in
How to transfer a property from an infoblock (Bitrix) to a modal window (fancybox)?
Guys, tell me how to transfer the property (a) of the infoblock to the modal (pop-up) window? This property is of type file(image). I did something like this.
<div class="look_plan"><a class="fancybox" href="<? echo $arResult['DISPLAY_PROPERTIES']['PLAN_IMGS']['DISPLAY_VALUE'];?>"><p>Посмотреть планировку</p></a></div>
Answer the question
In order to leave comments, you need to log in
Maybe someone will come in handy. I did so
<?$plan = CFile::GetPath($arResult["PROPERTIES"]["PLAN_IMGS"]["VALUE"]);?><img src="<?echo $plan;?>" />
DISPLAY_VALUE - this is exactly the link and you will
need to use $arResult['PROPERTIES']['PLAN_IMGS']['VALUE'] if it is multiple, then it will be an array of file IDs, if not, respectively - a string with ID, you need to get the src of the picture via CFile: :GetByID
study:
dev.1c-bitrix.ru/api_help/main/reference/cfile/ind... I
advise you to do this not in the template, but in result_modifier.php
property(s) of the infoblock
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question