mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT: Add ability to change URL for SS logo in CMS Menu
This commit is contained in:
parent
e9a544b719
commit
ea2dc9da0e
@ -1371,6 +1371,30 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
|||||||
return (class_exists('SiteConfig')) ? SiteConfig::current_site_config() : null;
|
return (class_exists('SiteConfig')) ? SiteConfig::current_site_config() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The href for the anchor on the Silverstripe logo.
|
||||||
|
* Set by calling LeftAndMain::set_application_link()
|
||||||
|
*
|
||||||
|
* @var String
|
||||||
|
*/
|
||||||
|
static $application_link = 'http://www.silverstripe.org/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the href for the anchor on the Silverstripe logo in the menu
|
||||||
|
*
|
||||||
|
* @param String $link
|
||||||
|
*/
|
||||||
|
public static function set_application_link($link) {
|
||||||
|
self::$application_link = $link;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public function ApplicationLink() {
|
||||||
|
return self::$application_link;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The application name. Customisable by calling
|
* The application name. Customisable by calling
|
||||||
* LeftAndMain::setApplicationName() - the first parameter.
|
* LeftAndMain::setApplicationName() - the first parameter.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div class="cms-menu cms-panel cms-panel-layout west" id="cms-menu" data-layout-type="border">
|
<div class="cms-menu cms-panel cms-panel-layout west" id="cms-menu" data-layout-type="border">
|
||||||
<div class="cms-logo-header north">
|
<div class="cms-logo-header north">
|
||||||
<div class="cms-logo">
|
<div class="cms-logo">
|
||||||
<a href="http://www.silverstripe.org/" target="_blank" title="SilverStripe (Version - $CMSVersion)">
|
<a href="$ApplicationLink" target="_blank" title="SilverStripe (Version - $CMSVersion)">
|
||||||
SilverStripe <% if CMSVersion %><abbr class="version">$CMSVersion</abbr><% end_if %>
|
SilverStripe <% if CMSVersion %><abbr class="version">$CMSVersion</abbr><% end_if %>
|
||||||
</a>
|
</a>
|
||||||
<span><% if SiteConfig %>$SiteConfig.Title<% else %>$ApplicationName<% end_if %></span>
|
<span><% if SiteConfig %>$SiteConfig.Title<% else %>$ApplicationName<% end_if %></span>
|
||||||
|
Loading…
Reference in New Issue
Block a user