By default, the properties are displayed, for example, in this file /bitrix/templates/template/components/bitrix/news.detail/catalog/template.php like this: <?if($arResult["PROPERTIES"]["test123"]["VALUE"]):?> <div class="project-top__parameter-item"> <div class="project-top__parameter-name"> <?=$arResult["PROPERTIES"]["test123"]["NAME"]?> </div> <div class="project-top__parameter-line"></div> <div class="project-top__parameter-size"> <?=$arResult["PROPERTIES"]["test123"]["VALUE"]?> </div> </div> <?endif;?> where test123 is a product property. If you need to hide this property for all groups, for example, except for Admins …
Read More »Bitrix
301 redirect from index.php except admin folder
Description of the problem – if you add a standard redirect from index.php to the root of the site, this rule will by default apply to the site admins. For Joomla and Вitrix, the result will be the inability to log in to the admin panel, because the index will …
Read More »Display: inline-block does not stretch to width, but sticks to the left In Safari
The problem is described in the title of this article. If elements that in normal browsers stretch across the width of the stage with active display: inline-block; in Safari ignore the width and stick together on the left, then for the parent to which this inline-block was assigned, try to …
Read More »Popup image on click without href
A very elegant solution, with which the image will not be wrapped in <a href=””></a>, image will float on click to the center of the screen and will be able to close both on the top cross and on a click on a translucent background. Image code: <div class="image__wrapper"> <img …
Read More »Include the file and display the value if it is specified in this file
This method was created for SEO edits on the Bitrix site (generated h1 values were entered in the file and displayed in the template). Today I returned to this solution for canonical edits, here is the code and description: <?php include($_SERVER['DOCUMENT_ROOT']."/seo.php"); if(isset($seoh1) AND $seoh1!='') {echo $seoh1;} else {echo $heading_title;} ?> …
Read More »How to change the width for Vk and Facebook widgets from pixels to percentages
Very often I need to replace a narrow widget, which for some reason is assigned to VKontakte with a fixed width of 300px, with a percentage, for example 100% – in order to be displayed on the entire width of the side column. The solution is simple, make changes to …
Read More »Title for bitrix pagination
I will not describe why this is necessary, I will only publish a ready-made solution. else echo $APPLICATION->ShowProperty("meta_title"); if (isset($_GET['PAGEN_1']) && $_GET['PAGEN_1']!=1) { echo " Page ".$_GET['PAGEN_1']; } if (isset($_GET['PAGEN_2']) && $_GET['PAGEN_2']!=1) { echo " Page ".$_GET['PAGEN_2']; } if (isset($_GET['PAGEN_3']) && $_GET['PAGEN_3']!=1) { echo " Page ".$_GET['PAGEN_3']; } The disadvantage …
Read More »How to place a favicon on a website
If you’re using a site with a CMS, you probably already have a default favicon that you’ll want to change. To do this, you need to search for the favicon.ico line in the source code, and you will see in which folder the current favicon is loaded. The easiest method …
Read More »Question marks in the Bitrix admin panel
After installing the purchased extension “Multiregionality from Intec”, a problem was discovered in the admin panel – for regions, all fields instead of Cyrillic are displayed with question marks, similarly when displaying a component on the site. According to the recommendations of Bitrix, a system check was made, and everything …
Read More »