Answer the question
In order to leave comments, you need to log in
Popup window with linked elements in 1C Bitrix?
Hello.
On the main page there is a list of clients with whom our company has worked.
Displayed via the News complex component. Now, as usual, if you click on the client's icon, you get to the detailed news.
We set the task: When clicking on the client's icon, a pop-up window appeared with all orders from this client. Unless, of course, there were other orders from this client. If not, that is, there was only one order, then we get into the detailed news.
The infoblock has a property: joxi.ru/BA0aEoXT1Qdqry
Some elements have a binding: joxi.ru/Vrwpvd7FoMwzmX
Here is the source code that displays the news announcement
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<div>
<?foreach($arResult["ITEMS"] as $arItem):?>
<?
$this->AddEditAction($arItem['ID'], $arItem['EDIT_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_EDIT"));
$this->AddDeleteAction($arItem['ID'], $arItem['DELETE_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_DELETE"), array("CONFIRM" => GetMessage('CT_BNL_ELEMENT_DELETE_CONFIRM')));
?>
<?if($arParams["DISPLAY_PICTURE"]!="N" && !empty($arItem["DISPLAY_PROPERTIES"]["LOGO"]["VALUE"])):?>
<?$arrImages = !is_array($arItem["DISPLAY_PROPERTIES"]["LOGO"]["VALUE"]) ? array($arItem["DISPLAY_PROPERTIES"]["LOGO"]["VALUE"]) : $arItem["DISPLAY_PROPERTIES"]["LOGO"]["VALUE"];
foreach($arrImages as $imgID) {?>
<a href="<?=Ссылка?>" class="client_<?=$arItem['ID']?>">
<?echo CFile::ShowImage($imgID, 100, 100, 'border="0" style="float:left;height: 56px;" ');?>
</a>
<?}
?>
<?endif?>
<?endforeach;?>
</div>
Answer the question
In order to leave comments, you need to log in
After the link, make a hidden div, display all projects in it, if there are no projects, then don't make a div. Attach an onclick event to the link. In the event handler, check if there is a div after this link, then using fancybox make a pop-up window with the contents of this div, if there is no div, then location.href= <?=Link?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question