Hello! It is necessary on a separate page (which will be determined by url) to display other text from one page that is used everywhere as the header of the site. Here is the text itself:

International Academy of Tourism in Antalya

On the school pages, for example, you need to bring the International School in Antalya. How can this be implemented? Thank you in advance! Bitrix site

<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?> <a href="/" title="Eduant" > <style> .reg-btn { position: absolute; top: 86px; right: 17px; background: #ff9b59 !important; background-image: -webkit-linear-gradient(top, #ff9b59, #e05a00) !important; background-image: -moz-linear-gradient(top, #ff9b59, #e05a00) !important; background-image: -ms-linear-gradient(top, #ff9b59, #e05a00) !important; background-image: -o-linear-gradient(top, #ff9b59, #e05a00) !important; background-image: linear-gradient(to bottom, #ff9b59, #e05a00) !important; -webkit-border-radius: 7; -moz-border-radius: 7; border-radius: 7px; text-shadow: 0px 1px 4px #666666 !important; font-family: Arial; color: #ffffff !important; font-size: 16px !important; padding: 5px 12px 5px 12px; margin-bottom: 5px !important; border: solid #dedede 2px; text-decoration: none; } .reg-btn:hover { background: #3cb0fd !important; background-image: -webkit-linear-gradient(top, #3cb0fd, #0e7dc7) !important; background-image: -moz-linear-gradient(top, #3cb0fd, #0e7dc7) !important; background-image: -ms-linear-gradient(top, #3cb0fd, #0e7dc7) !important; background-image: -o-linear-gradient(top, #3cb0fd, #0e7dc7) !important; background-image: linear-gradient(to bottom, #3cb0fd, #0e7dc7) !important; text-decoration: none !important; } </style> <div id="company_logo"></div> </a> <div class="subtitle">ΠœΠ΅ΠΆΠ΄ΡƒΠ½Π°Ρ€ΠΎΠ΄Π½Π°Ρ АкадСмия Π’ΡƒΡ€ΠΈΠ·ΠΌΠ° Π² Анталии</div> <p align="left" style="color: rgb(18, 61, 116); font-size: 100%;"> Вурция: <strong>+90 (242) 324 2407</strong> Россия: <strong>+7 (499) 703 02 36</strong> ΠšΠ°Π·Π°Ρ…ΡΡ‚Π°Π½: <strong>+7 (727) 350 53 56</strong><a href="http://zingaya.com/widget/e301d0330f634c3892312b08949d834d" onclick="window.open(this.href+'?referrer='+escape(window.location.href)+'', '_blank', 'width=236,height=220,resizable=no,toolbar=no,menubar=no,location=no,status=no'); return false" class="zingaya_button1366099122678" ></a></p> <a href="http://eduant.ru/forms/form3.php" class="reg-btn" >РСгистрация Π°Π±ΠΈΡ‚ΡƒΡ€ΠΈΠ΅Π½Ρ‚ΠΎΠ²</a> 

    1 answer 1

    There are several options:

    Determine the current page ( more )

    Just check the current page and display its line for it.

    Sample code in header:

     <?if ($APPLICATION->GetCurPage(false) !== '/page/'): ?> <div class="subtitle">ΠœΠ΅ΠΆΠ΄ΡƒΠ½Π°Ρ€ΠΎΠ΄Π½Π°Ρ АкадСмия Π’ΡƒΡ€ΠΈΠ·ΠΌΠ° Π² Анталии</div> <? endif;?> 

    We derive the value from the property ( more )

    Create a property for the page. Then we add the value for the main section and on pages or sections we override the value of the property.

    Sample code in header:

     <? $subtitle = $APPLICATION->GetProperty("subtitle"); if (strlen($subtitle)>0) echo $subtitle; else echo "ΠœΠ΅ΠΆΠ΄ΡƒΠ½Π°Ρ€ΠΎΠ΄Π½Π°Ρ АкадСмия Π’ΡƒΡ€ΠΈΠ·ΠΌΠ° Π² Анталии";?> 

    We derive the value of the included region ( more )

    To do this, we create a shared include area and connect it, and in the necessary sections we redefine it.

    • Thank you very much, the code I gave above can be changed so that the name is displayed depending on the page where the user is located, the code itself is higher, it is executed on all pages in the header of the site. I tried the methods that you wrote above, did not work. All I need is that on this page eduant.ru/school/ the name is displayed - International Russian School. - Stewart Bertalan
    • I tried to display this way - <? If ($ APPLICATION-> GetCurPage (false)! == '/ school /'):?> <Div class = "subtitle"> International Tourism Academy in Antalya </ div> <? endif;?> But now on the school page, respectively, is empty, there is no label, the question is how to insert it? else inside this code does not work (I'm noob in php and html) - Stewart Bertalan
    • You then do <?if ($APPLICATION->GetCurPage(false) == '/school/'): ?> - Mihanik71
    • <div class = "subtitle"> International Academy of Tourism in Antalya </ div> </a> <? if ($ APPLICATION-> GetCurPage (false) == '/ school /'):?> <div class = "subtitle "> International Russian School in Antalya </ div> <? endif;?> - Stewart Bertalan
    • I did this, but now there are 2 problems, 2 inscriptions in / school / are displayed at once, and if we go over / school / training /, another inscription is displayed, the International Russian School is needed, and the International Academy is published. ... - Stewart Bertalan