Toolkit_Page
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 14 Aug 2014 18:56:49 +0000 (14:56 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 14 Aug 2014 18:59:45 +0000 (14:59 -0400)
update the navigation for main so the background image
is now real image tag so we can add border to it (orange)
also add external.js script

Toolkit/Page.php

index 988d8bf..e76815f 100755 (executable)
@@ -162,6 +162,7 @@ class Toolkit_Page
         $GLOBALS['bottomScripts'][] = MEDIA_BASE_URL . 'js/pageSetup.js';
         $GLOBALS['styleSheets'][] = $this->mediaBaseURL . 'fancybox/jquery.fancybox.css';
         $GLOBALS['bottomScripts'][] = $this->mediaBaseURL . "fancybox/jquery.fancybox.js";
+        $GLOBALS['bottomScripts'][] = $this->glmAppBaseURL . 'libjs/external.js';
     }
 
     /**
@@ -449,9 +450,6 @@ class Toolkit_Page
         }
         $this->pageTitle = $this->_getPageTitle($this->_catid);
 
-//        if (defined('MAIN_LEVEL_NAV_ARRAY') && MAIN_LEVEL_NAV_ARRAY) {
-//            $mainNavArray = unserialize(MAIN_LEVEL_NAV_ARRAY);
-//        }
         $bodyFactory = new Toolkit_Template_Page_BodyFactory(
             $this->_breadCrumbs,
             $this->_pageGateway,
@@ -463,6 +461,7 @@ class Toolkit_Page
         $this->toolboxContent = $this->_toolboxPage->getBody(
             $this->_catid, $bodyFactory
         );
+//        echo '<pre>'.print_r($this->toolboxContent, true).'</pre>';exit;
         $page = $this->_pageGateway->find($this->_catid);
         $this->topParentId = $this->_pageGateway->findTopParent($this->_catid);
 
@@ -722,10 +721,13 @@ class Toolkit_Page
                 ? ' class="'.$className.'"'
                 : ' class="dropdown"';
         }
-        $styleCode = ($backgroundImage)
-            ? 'style="background-image: url('.$backgroundImage.');"'
-            : '';
+        $styleCode = '';//($backgroundImage)
+//            ? 'style="background-image: url('.$backgroundImage.');"'
+//            : '';
         $result = "{$tabs}<ul{$mainClass}{$styleCode}>\n";
+        if ($backgroundImage) {
+            $result .= '<li class="mainNavLiImgContainer"><img class="mainNavImg" src="'.$backgroundImage.'" =></li>';
+        }
         foreach ($array as $i => $node) {
             $classes = array();
             if ($mobile && $node['class']) {