Skip to content

Instantly share code, notes, and snippets.

@veksa
Created July 19, 2014 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veksa/ac697a80d4031d2bc696 to your computer and use it in GitHub Desktop.
Save veksa/ac697a80d4031d2bc696 to your computer and use it in GitHub Desktop.
Bitrix, Форматирование заголовков.
if( !CSite::inDir( "/index.php" ) ){
if( strlen( $APPLICATION->GetPageProperty('title') ) > 1 ){
$title = $APPLICATION->GetPageProperty('title');
}else{
$title = $APPLICATION->GetTitle();
}
$APPLICATION->SetPageProperty("title", $title.( $arSite['SITE_NAME'] ? ' - ' : '' ).$arSite['SITE_NAME'] );
$APPLICATION->AddChainItem( $title );
}else{
if( strlen($APPLICATION->GetPageProperty('title') ) > 1){
$title = $APPLICATION->GetPageProperty('title');
}else{
$title = $APPLICATION->GetTitle();
}
$APPLICATION->SetPageProperty( "title", $arSite['SITE_NAME'].( $arSite['SITE_NAME'] ? ' - ' : '' ).$title );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment