There is a component "menu" in the bitrix. you need to change it so that when editing / adding a menu item, there was an opportunity to add a picture, specify the path to it (as I understand it is the easiest option) after this picture goes and is inserted under the menu item itself. in general, you need to add another cell on the edit / add page of the menu item. I do not understand how to do this. alt text

    1 answer 1

    Go to the edit menu in the Control Panel, there are additional fields "Options" ...

    img

    .template.php <?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?> <?if (!empty($arResult)):?> <?foreach($arResult as $arItem):?> **<?if($arItem["PARAMS"]["RED"]){?> <dd class="red"><a href="<?=$arItem["LINK"]?>"><img src="<?=$arItem["PARAMS"]["RED"]?>"><?=$arItem["TEXT"]?></a></dd>** <?}else{?> <dd><a href="<?=$arItem["LINK"]?>"><?=$arItem["TEXT"]?></a></dd> <?}?> <?endforeach?> <dd class="fill"></dd> <?endif?> 

    Update

    You can make a crutch, then you can write "Just эклибрис#/upload/images.png " in the name

    And in .template.php

     $text=explode('#',$arItem["TEXT"]); <a href="<?=$arItem["LINK"]?>"><?=$text[1] ? '<img src="'.$text[1].'"/>' : '';?><?=$text[0]?></a> 
    • Thank you for your reply. In principle, this solution is suitable, but it is not very convenient. I would like, that it would be possible to do without the additional “paramert” array, I would like to make changes to the arItem array itself, i.e. add an element to it so that you don’t have to go to the control panel every time, i.e. Add cell ["IMAGE"] to ["LINK"] and ["TEXT"] cells. - adun
    • I want to add elements, and not just fix them :) the decision is complicated and long, and very necessary :) - adun