Update Mobile navigation
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 4 Sep 2014 16:25:31 +0000 (12:25 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 4 Sep 2014 16:27:44 +0000 (12:27 -0400)
Add class current to the currently selected page link.

Toolkit/Page.php

index 4478769..86a9ced 100755 (executable)
@@ -418,7 +418,7 @@ class Toolkit_Page
         }
         $this->pageTitle = $this->_getPageTitle($this->_catid);
         $this->pageTitleShort = $this->_getPageTitleShort($this->_catid);
-        
+
         $bodyFactory = new Toolkit_Template_Page_BodyFactory(
             $this->_breadCrumbs,
             $this->_pageGateway,
@@ -685,6 +685,9 @@ class Toolkit_Page
                     $classes[] = $node['class'];
                 }
             }
+            if ($this->_catid == $node['id']) {
+                $class = ' class="current"';
+            }
 
             if (!empty($node['pages'])) {
                 $classes[] = 'has-dropdown';
@@ -753,7 +756,7 @@ class Toolkit_Page
 
         return $title;
     }
-    
+
         /**
      * Returns page title
      *