Permalink
Browse files

ENHANCEMENT: Add ability to change URL for SS logo in CMS Menu

  • Loading branch information...
1 parent e9a544b commit ea2dc9da0e2fa2d47adcea6c8aefd7e206c96372 @kinglozzer kinglozzer committed with chillu Oct 24, 2012
Showing with 25 additions and 1 deletion.
  1. +24 −0 admin/code/LeftAndMain.php
  2. +1 −1 admin/templates/Includes/LeftAndMain_Menu.ss
@@ -1370,6 +1370,30 @@ public function SwitchView() {
public function SiteConfig() {
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
@@ -1,7 +1,7 @@
<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">
- <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 %>
</a>
<span><% if SiteConfig %>$SiteConfig.Title<% else %>$ApplicationName<% end_if %></span>

0 comments on commit ea2dc9d

Please sign in to comment.