Answer the question
In order to leave comments, you need to log in
Why are links in the Bitrix template set from the site root?
I want to pass a link to the template through a property, but the link starts from the root of the site. How to fix it?
<div class="banner-slide__title bannerText"><a href="<?=$arItem["DISPLAY_PROPERTIES"]["SLIDER_URL"]["VALUE"] ?>"><?=$arItem["NAME"]?></a></div>
Answer the question
In order to leave comments, you need to log in
I pass the value yandex.ru, and the link becomes: http:/site.ru/yandex.ru
http://yandex.ru
Bitrix has nothing to do with it. What you enter into a property is what it outputs.
Those. let's say if you entered yandex.ru, then href will just be yandex.ru. and of course this will be a link to http:/site.ru/yandex.ru with the main one.
htmlbook.ru/samhtml/ssylki/absolyutnye-i-otnositel...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question