<?php
$val .= '<div class="cms-sitename">
    <a href="';

$val .= $scope->locally()->XML_val('ApplicationLink', null, true);
$val .= '" class="cms-sitename__link font-icon-silverstripe font-icon-large" target="_blank" title="';

$val .= $scope->locally()->XML_val('ApplicationName', null, true);
$val .= ' (Version - ';

$val .= $scope->locally()->XML_val('CMSVersion', null, true);
$val .= ')">
        <span class="sr-only">';

$val .= $scope->locally()->XML_val('ApplicationName', null, true);
$val .= ' ';

if ($scope->locally()->hasValue('CMSVersion', null, true)) { 
$val .= '<abbr class="cms-sitename__version">';

$val .= $scope->locally()->XML_val('CMSVersion', null, true);
$val .= '</abbr>';


}
$val .= '</span>
    </a>
    <a class="cms-sitename__title" href="';

$val .= $scope->locally()->XML_val('BaseHref', null, true);
$val .= '" target="_blank">';

if ($scope->locally()->hasValue('SiteConfig', null, true)) { 
$val .= $scope->locally()->obj('SiteConfig', null, true)->XML_val('Title', null, true);

}else { 
$val .= $scope->locally()->XML_val('ApplicationName', null, true);

}
$val .= '</a>
</div>
';

