Views: 5533
Last Modified: 10.10.2012

Page title management

The page title can be assigned the following ways:

  • during the page editing in the embedded system editor by adding the following function in the page source code:

    <?
    $APPLICATION-> SetTitle("About us;);
    ?>
  • the page title can be assigned dynamically by one of the placed on the page components:

    <?
    $arIBlock = GetIBlock($ID, "news")
    $APPLICATION->SetTitle($arIBlock["NAME"]);
    …
    ?>

The document title displaying is implemented with use of the ShowTitle() function placed in the area intended for the page title showing:

<H1><?$APPLICATION->ShowTitle()?></H1>

If the ShowTitle() function is used with the false parameter, it means that the title property value will not be used for page title assigning.

<H1><?$APPLICATION->ShowTitle(false)?></H1>

In other words, in this case as the page title will be used a value assigned by the SetTitle() function.

Section title management

The document title displaying is implemented by the ShowTitle() function placed in the site template header:

<head><title><?$APPLICATION->ShowTitle()?></title></head>

The web-browser window title can be assigned using the different mechanisms. By default as the web-browser window title is used a value set for the page property title. If for this property were not set any value, the web-browser window title will be equivalent to the page title.



Courses developed by Bitrix24