Working in the template
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 12 Aug 2014 13:43:22 +0000 (09:43 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 12 Aug 2014 13:43:22 +0000 (09:43 -0400)
Working in some changes for how the toolbox is output by setting it up
to use the template for toolbox.html.

Toolkit/Page.php
Toolkit/Template/Image/Left.php
Toolkit/Template/Image/Right.php
Toolkit/Template/Page/Member.php
Toolkit/Template/Page/Toolbox.php
Toolkit/Toolbox/PageGatewayAbstract.php
config/application.ini
static/16.phtml [new file with mode: 0755]
templates/template.html
templates/toolbox.html [new file with mode: 0644]

index e34db36..9c1444e 100755 (executable)
@@ -423,6 +423,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);
 
@@ -453,7 +454,7 @@ class Toolkit_Page
             $this->pageId = $this->_catid;
         }
         $this->_navigationFactory->setGateway($this->_pageGateway);
-        $this->mainNav = $this->_getMainNav($this->_catid); 
+        $this->mainNav = $this->_getMainNav($this->_catid);
         $this->sideNav = $this->_getSideNav($this->_catid);
 
         $this->newsletterAction = Toolkit_Template_Page::getSeoUrl(
@@ -566,10 +567,10 @@ class Toolkit_Page
     {
         $nav          = $this->_navigationFactory->createMainNav();
         $mainNavArray = $nav->getNavStructure($this->_pageGateway, $catid);
+
         return $nav->renderPageNav($mainNavArray, 'tree');
     }
-    
+
         private function _getArrayToListNav($catid)
     {
         $sideNav = new Toolkit_Template_Navigation_AllInOneSideNav(
@@ -579,7 +580,7 @@ class Toolkit_Page
         $html = $this->_arrayToListHTML($nav, 0, "mainNav");
         return ($html) ? $html : '';
     }
-    
+
     private function _arrayToListHTML($array, $level = 0, $className = null)
     {
         static $tab = "\t", $format = '<a href="%s"%s>%s</a>';
index 6fb37f1..81eb650 100644 (file)
@@ -45,14 +45,14 @@ class Toolkit_Template_Image_Left extends Toolkit_Template_Image_ImageAbstract
        {
                $imageData = $this->_adapter->getImageSize($size . $this->_src);
 
-               $html  = '<div class="imageleft" style="width: ' . $imageData[0] . 'px;">';
+               $html  = '<figure>';
                $html .=        parent::getImage($size);
                if (!empty($this->_caption)) {
-                       $html .=        '<div class="imagecaption">';
+                       $html .=        '<figcaption>';
                        $html .=                $this->_caption;
-                       $html .=        '</div>';
+                       $html .=        '</figcaption>';
                }
-               $html .= '</div>';
+               $html .= '</figure>';
 
                return $html;
        }
index f1ef03b..c115068 100644 (file)
@@ -45,14 +45,14 @@ class Toolkit_Template_Image_Right extends Toolkit_Template_Image_ImageAbstract
        {
                $imageData = $this->_adapter->getImageSize($size . $this->_src);
 
-               $html  = '<div class="imageright" style="width: ' . $imageData[0] . 'px;">';
+               $html  = '<figure>';
                $html .=        parent::getImage($size);
                if (!empty($this->_caption)) {
-                       $html .=        '<div class="imagecaption">';
+                       $html .=        '<figcaption>';
                        $html .=                $this->_caption;
-                       $html .=        '</div>';
+                       $html .=        '</figcaption>';
                }
-               $html .= '</div>';
+               $html .= '</figure>';
 
                return $html;
        }
index 3eff26d..aa8dbf7 100644 (file)
@@ -351,53 +351,36 @@ class Toolkit_Template_Page_Member extends Toolkit_Template_Page_Toolbox
         $breadCrumbsBuilder = $this->breadCrumbsFactory->createBreadCrumbsHelper();
         $page = $this->pageGateway->find($this->id);
 
-        $coupons = null;
-        if (defined('COUPONS') && COUPONS) {
-            $coupons = $this->_getPageCoupons($this->id);
-        }
-
-        if ($memberId = filter_input(INPUT_GET, 'member_id', FILTER_VALIDATE_INT)) {
-            // check and see if the member is inactive
-            // if they are then don't show bread crumb and give out 404 header
-            if (!$this->_isMemberActive($memberId)) {
-                header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
-                $badPage = new Toolkit_Template_Page_Bad();
-                return $badPage->getContent();
-            } else {
-                $breadCrumbs = $breadCrumbsBuilder->toHtml($this->id);
-                $profile     = $this->_getMemberProfilePage($this->id);
-                return $breadCrumbs .
-                   $profile;
-            }
-        } elseif (!$page['search_form']) {
-            $breadCrumbs         = $breadCrumbsBuilder->toHtml($this->id);
-            $searchResults       = $this->_getMemberSearchResults($this->id);
-            $secondaryParagraphs = $this->getSecondaryParagraphs($this->id);
-            $primaryParagraph    = $this->getPrimaryParagraph($this->id);
-
-            return $breadCrumbs .
-                   $primaryParagraph .
-                   $searchResults .
-                   $coupons .
-                   $secondaryParagraphs;
-        } elseif (isset($_GET['search'])) {
-            $breadCrumbs   = $breadCrumbsBuilder->toHtml($this->id);
-            $searchResults = $this->_getMemberSearchResults($this->id);
-
-            return $breadCrumbs .
-                   $searchResults;
-        } else {
-            $breadCrumbs         = $breadCrumbsBuilder->toHtml($this->id);
-            $searchForm          = $this->_getMemberSearchForm($this->id);
-            $secondaryParagraphs = $this->getSecondaryParagraphs($this->id);
-            $primaryParagraph    = $this->getPrimaryParagraph($this->id);
-
-            return $breadCrumbs .
-                   $primaryParagraph .
-                   $searchForm .
-                   $coupons .
-                   $secondaryParagraphs;
-        }
+        $tpl
+            = new HTML_Template_Flexy($GLOBALS['flexyOptions']);
+        $tPage = new stdClass();
+        $tPage->pods = '';
+        $tPage->isMainLevel = false;
+        $tPage->title  = $page['title'];
+        $tPage->photos = $photoGalleryContent;
+        $tPage->coupons = null;
+        $tPage->specials = $specials;
+        $tPage->staticPageContent
+            = $this->getStaticPageContent($this->id);
+        $tPage->breadCrumbs
+            = $breadCrumbsBuilder->toHtml($this->id);
+        $tPage->primaryParagraph
+            = $this->getPrimaryParagraph($this->id);
+        $tPage->secondaryParagraphs
+            = $this->getSecondaryParagraphs($this->id);
+
+               if (filter_input(INPUT_GET, 'member_id', FILTER_VALIDATE_INT)) {
+                       $tPage->profile = $this->_getMemberProfilePage($this->id);
+               } elseif (!$page['search_form']) {
+                       $tPage->searchResults = $this->_getMemberSearchResults($this->id);
+               } elseif (isset($_GET['search'])) {
+                       $tPage->searchResults = $this->_getMemberSearchResults($this->id);
+               } else {
+                       $tPage->searchForm = $this->_getMemberSearchForm($this->id);
+               }
+        return $tPage;
+//        $tpl->compile('toolbox.html');
+//        return $tpl->bufferedOutputObject($tPage);
     }
 
     //    }}}
index 1e50f90..515fa0a 100644 (file)
@@ -150,27 +150,53 @@ class Toolkit_Template_Page_Toolbox implements Toolkit_Template_Page_IBody
      */
        public function getContent()
        {
-               $breadCrumbsBuilder  = $this->breadCrumbsFactory->createBreadCrumbsHelper();
-               $breadCrumbs         = $breadCrumbsBuilder->toHtml($this->id);
-               $secondaryParagraphs = $this->getSecondaryParagraphs($this->id);
-               $primaryParagraph    = $this->getPrimaryParagraph($this->id);
-        $coupons = null;
-               if (defined('COUPONS') && COUPONS) {
-                       $coupons = $this->_getPageCoupons($this->id);
-               }
-               $staticPageContent   = $this->getStaticPageContent($this->id);
+        $page = $this->pageGateway->find($this->id);
+        $breadCrumbsBuilder
+            = $this->breadCrumbsFactory->createBreadCrumbsHelper();
 
                $photoGalleryContent = null;
                if (defined('PHOTO_GALLERY') && PHOTO_GALLERY) {
-                       $photoGalleryContent = $this->photoGallery->getPageGallery($this->id);
+            $photoGalleryContent
+                = $this->photoGallery->getPageGallery($this->id);
                }
 
-               return $breadCrumbs .
-                          $primaryParagraph .
-                          $staticPageContent .
-                          $secondaryParagraphs .
-                          $coupons .
-                          $photoGalleryContent;
+//        $mainNavCategories
+//            = (defined('MAIN_NAV_PAGES') && MAIN_NAV_PAGES)
+//            ? unserialize(MAIN_NAV_PAGES)
+//            : null;
+
+//        $tpl
+//            = new HTML_Template_Flexy($GLOBALS['flexyOptions']);
+        $tPage = new stdClass();
+//        if (   isset($mainNavCategories)
+//            && is_array($mainNavCategories)
+//            && in_array($this->id, $mainNavCategories)) {
+//            $tPage->isMainLevel = true;
+//        } else {
+//            $tPage->pods = '';
+//            $tPage->isMainLevel = false;
+//        }
+        if ($page) {
+            $tPage->title  = $page['title'];
+            $tPage->photos = $photoGalleryContent;
+            $tPage->coupons
+                = (defined('COUPONS'))
+                ? $this->_getPageCoupons($this->id)
+                : null;
+    //        $tPage->specials = $specials;
+            $tPage->staticPageContent
+                = $this->getStaticPageContent($this->id);
+            $tPage->breadCrumbs
+                = $breadCrumbsBuilder->toHtml($this->id);
+            $tPage->primaryParagraph
+                = $this->getPrimaryParagraph($this->id);
+            $tPage->secondaryParagraphs
+                = $this->getSecondaryParagraphs($this->id);
+        }
+
+        return $tPage;
+//        $tpl->compile('toolbox.html');
+//        return $tpl->bufferedOutputObject($tPage);
        }
 
        //      }}}
@@ -254,6 +280,11 @@ class Toolkit_Template_Page_Toolbox implements Toolkit_Template_Page_IBody
        }
 
        //      }}}
+    protected function getMainParagraphImage(array $data, $side)
+    {
+        $imageBuilder = $this->imageFactory->getImageBuilder($data, $side);
+        return $imageBuilder->getImage(TOOLBOX_RESIZED);
+    }
        //      {{{     getParagraphImage()
 
     /**
@@ -311,7 +342,7 @@ class Toolkit_Template_Page_Toolbox implements Toolkit_Template_Page_IBody
                $cache = $this->cache->get("page-$id", 'Toolbox');
 
                if ($cache) {
-                       return $cache;
+            return unserialize($cache);
                } else {
                        $page = $this->pageGateway->find($id);
 
@@ -327,19 +358,32 @@ class Toolkit_Template_Page_Toolbox implements Toolkit_Template_Page_IBody
                                break;
                        }
 
-                       $html  = '<div id="category">';
-                       $html .= "<h1>{$page['title']}</h1>";
-                       if ($page['paragraph_links']) {
-                               $html .= $this->getParagraphLinks();
+            $title = $page['title'];
+            $links
+                = ($page['paragraph_links'])
+                ? $this->getParagraphLinks()
+                : '';
+            if ($page && !$page['hide_image']) {
+                $image = $this->getMainParagraphImage($page, $side);
                        }
-                       $html .= $this->getParagraphImage($page, $side);
-                       $html .= $this->keywordReplacement->findAndReplace($page['description']);
-                       $html .= '</div>';
-
-                       $this->cache->save($html, "page-$id", 'Toolbox');
+            $description
+                = $this->keywordReplacement
+                    ->findAndReplace($page['description']);
+            $primaryParagraph = array(
+                'title'       => $title,
+                'description' => $description,
+                'image'       => $image,
+                'links'       => $links,
+                'hide_image'  => $page['hide_image']
+            );
+            $this->cache->save(
+                serialize($primaryParagraph),
+                "page-$id",
+                'Toolbox'
+            );
                }
 
-               return $html;
+        return $primaryParagraph;
        }
 
        //      }}}
@@ -361,7 +405,11 @@ class Toolkit_Template_Page_Toolbox implements Toolkit_Template_Page_IBody
                if ($cache) {
                        return $cache;
                } else {
+            $sections = array();
                        $page       = $this->pageGateway->find($id);
+            if (!$page) {
+                return false;
+            }
                        $paragraphs = $this->paragraphGateway->findAll($id);
 
                        $side = array('left', 'right');
@@ -390,22 +438,27 @@ class Toolkit_Template_Page_Toolbox implements Toolkit_Template_Page_IBody
                                break;
                        }
 
-                       $html = '';
+//                     $html = '';
                        $linksFormat = '<a href="#sect-%s">%s</a>';
                        foreach ($paragraphs as $paragraph) {
                                if ($paragraph['active']) {
-                                       $html .= '<div class="listing" id="sect-'.$paragraph['id'].'">';
-                                       $html .= "<h2>{$paragraph['title']}</h2>";
-                                       $html .= $this->getParagraphImage($paragraph, $side[$key]);
-                                       $html .= $this->keywordReplacement->findAndReplace($paragraph['description']);
-
-                                       $html .= $this->getParagraphFiles($paragraph['files']);
+                    $sect = array();
+                    $sect = $paragraph;
+//                                     $html .= '<div class="listing" id="sect-'.$paragraph['id'].'">';
+//                                     $html .= "<h2>{$paragraph['title']}</h2>";
+                    $sect['image'] = $this->getParagraphImage($paragraph, $side[$key]);
+//                                     $html .= $this->getParagraphImage($paragraph, $side[$key]);
+                    $sect['description'] = $this->keywordReplacement->findAndReplace($paragraph['description']);
+//                                     $html .= $this->keywordReplacement->findAndReplace($paragraph['description']);
+                    $sect['files'] = $this->getParagraphFiles($paragraph['files']);
+//                                     $html .= $this->getParagraphFiles($paragraph['files']);
 
                                        if ($paragraph['back_to_top']) {
-                                               $html .= '<a href="#toolbox">Back to Top</a>';
+                        $sect['back_to_top'] = '<a href="#toolbox">Back to Top</a>';
+//                                             $html .= '<a href="#toolbox">Back to Top</a>';
                                        }
 
-                                       $html .= '</div>';
+//                                     $html .= '</div>';
 
                                        $this->paragraphLinks[] = sprintf(
                                                $linksFormat,
@@ -413,11 +466,13 @@ class Toolkit_Template_Page_Toolbox implements Toolkit_Template_Page_IBody
                                                $paragraph['title']
                                        );
                                        $key = $flip ? !$key : $key;
+                    $sections[] = $sect;
                                }
                        }
 
                        $this->cache->save($html, "paragraphs-$id", 'Toolbox');
-                       return $html;
+//                     return $html;
+            return $sections;
                }
        }
 
index 727b341..43e8904 100644 (file)
@@ -209,7 +209,7 @@ abstract class Toolkit_Toolbox_PageGatewayAbstract
                                        ? HOMEPAGE_HEADLINE_THUMB . $row['image']
                                        : '',
                                'header' => $row['navigation_name'],
-                               'descr'  => nl2br($row['headline_intro']),
+                               'descr'  => $row['headline_intro'],
                        );
                        if (++$count > 4) {
                                $count = 1;
index a859c76..a1e2780 100644 (file)
@@ -51,7 +51,7 @@ eventdb.application = On
 ; Turn the Events Common Application On or Off
 eventdb.commonEvents = On
 ; The page id in the toolbox that holds the event calendar
-eventdb.event_page = Off
+eventdb.event_page = 16
 ; Turn the home page events module On or Off for the event application
 eventdb.home_events = Off
 
diff --git a/static/16.phtml b/static/16.phtml
new file mode 100755 (executable)
index 0000000..787519e
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+if (defined('COMMON_EVENTS') && COMMON_EVENTS) {
+    // set CommonApp define if not set
+    if (!defined('COMMON_APP_BASE')) {
+        define('COMMON_APP_BASE', '/var/www/server/CommonApps/');
+    }
+    // load the event application config files form CommonApps
+    define('COMMON_APP_NAME', 'EventCalendar');
+    define('COMMON_APP_VERSION', 'V1');
+    define('COMMON_APP_INI', 'application.ini');
+    define('COMMON_APP_SITE_INI', 'eventCalendar.ini');
+
+    define('COMMON_APP_CONTROLLER', 'IndexController');
+    $appPath = COMMON_APP_BASE . COMMON_APP_NAME . '/' . COMMON_APP_VERSION . '/';
+    define('COMMON_APP_PATH', $appPath);
+    // now only need to pull in the main file to run the app
+    // pull in admin.php file
+    require COMMON_APP_PATH . 'Bootstrap.php';
+} else {
+    $events = new Toolkit_Events_Display(
+        Toolkit_Database::getInstance()
+    );
+    echo $events->toHTML($this->keywordReplacement);
+}
+
index 8e43d0f..eabe50b 100644 (file)
-<html>
-<head>
-<title>{pageTitle:h}</title>
-<meta http-equiv="content-type" content="text/html;charset=utf-8">
-<meta name="description" content="{metaTags:h}">
-<meta http-equiv="imagetoolbar" content="no">
-<meta http-equiv="imagetoolbar" content="false">
-{styles:h}
-{topScripts:h}
-</head>
-<body id="inside"><!-- body id home on homepage only , #inside for inside pages-->
-<div id="wrapper">
-       <div id="wrapperInner">
-               <div id="top">
-                       <a href="baseurl/index.php">
-                               <img id="logo" src="baseurl/assets/logo.png" width="520" height="50">
-                       </a>
-               </div><!-- /#top -->
-        {mainNav:h}
-               <div id="column">
-                       <div id="subnav">
-                {subNav:h}
-                       </div><!-- /#subnav -->
-               </div><!-- /#column -->
-               <div id="main">
-                       <div id="toolbox">
-                               {toolboxContent:h}
-                       </div><!-- /#toolbox -->
-               </div><!-- /#main -->
-               <div id="footer">
-                       <p>Dermatology Associates of Northern Michigan, P.C. 2240 Mitchell Park Petoskey, MI 49770 &middot; 231-487-2230</p>
-               </div>
-               <ul id="accreditations">
-                       <li id="aAAD">AAD</li>
-                       <li id="aABD">ABD</li>
-                       <li id="aACMS">ACMS</li>
-                       <li id="aASDS">ASDS</li>
-               </ul>
-               <div id="copyright">
-                       Copyright&copy;<?php echo date('Y');?> {siteName:h} - Produced by <a href="http://www.gaslightmedia.com">Gaslight Media</a>, All Rights Reserved.
-               </div><!-- /#copyright -->
-       </div><!-- /#wrapperInner" -->
-</div><!-- /#wrapper -->
-{bottomScripts:h}
-</body>
+<!doctype html>
+<html class="no-js" lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta name="description" content="{metaTags:h}">
+    <title>{pageTitle:h}</title>
+    {styles:h}
+    <link rel="stylesheet" href="{mediaBaseURL:h}css/foundation.min.css">
+    <link rel="stylesheet" href="{mediaBaseURL:h}css/normalize.css">
+    <link rel="stylesheet" href="{mediaBaseURL:h}styles.css">
+    <script src="{mediaBaseURL:h}js/vendor/modernizr.js"></script>
+    {topScripts:h}
+  </head>
+  <body>
+    <div class="off-canvas-wrap" data-offcanvas>
+      <div class="inner-wrap">
+
+        {if:isHomePage}
+        <div class="container" id="home">
+        {else:}
+        <div class="container" id="interior">
+        {end:}
+          <!-- Top header -->
+          <header class="row collapse">
+            <div class="small-12 columns">
+              <div class="logo left">
+                <a href="{homePageURL:h}"><img src="{mediaBaseURL:h}assets/logo.png" alt="Keweenaw Peninsula - Michigan's Copper Country" /></a>
+              </div>
+              <ul class="right global-nav">
+                <li><a href="{homePageUrl:h}">Home</a></li>
+                <li><a href="{getToolboxUrl(#17#):h}">Services</a></li>
+                <li><a href="{getToolboxUrl(#18#):h}">eNews</a></li>
+                <li><a href="{getToolboxUrl(#19#):h}">Contact</a></li>
+              </ul>
+
+              <form class="right search"  action="/" name="searchForm" method="get">
+                <input type="hidden" name="GLMSearch" value="true">
+                <input type="hidden" name="start" value="0">
+                <input type="hidden" name="rows" value="10">
+                <input type="search" name="query" size="50" />
+                <input type="submit" value=""/>
+              </form>
+
+              <ul class="right social">
+                <li><a href="#" class="twitter"></a></li>
+                <li><a href="#" class="facebook"></a></li>
+              </ul>
+
+            </div>
+          </header>
+
+          <div class="inner-container">
+            <!-- Nav Menus -->
+            <nav class="top-bar" data-topbar>
+              <ul class="title-area">
+                <li class="name print-only">
+                  <h1>Keweenaw Peninsula - Michigan's Copper Country</h1>
+                </li>
+                <li class="toggle-topbar menu-icon">
+                  <a class="right-off-canvas-toggle" href="#"><span>Menu</span></a>
+                </li>
+              </ul>
+              <section class="top-bar-section">
+                <ul class="left">
+                  <li class="not-click activities">
+                    <a href="/activities">Activities</a>
+                  </li>
+                  <li class="not-click attractions">
+                    <a href="/attractions">Attractions</a>
+                  </li>
+                  <li class="has-dropdown not-click lodging">
+                    <a href="/lodging">Lodging</a>
+                    <ul class="dropdown">
+                      <li><a href="#">Bed &amp; Breakfasts</a></li>
+                      <li><a href="#">Cabins/Cottages</a></li>
+                      <li><a href="#" id="active">Campgrounds</a></li>
+                      <li><a href="#">Hotels/Motels</a></li>
+                      <li><a href="#">Vacation Homes</a></li>
+                    </ul>
+                  </li>
+                  <li class="not-click restaurants">
+                    <a href="/restaurants">Restaurants</a>
+                  </li>
+                  <li class="not-click shopping">
+                    <a href="/shopping">Shopping</a>
+                  </li>
+                  <li class="not-click calendar">
+                    <a href="/calendar">Calendar</a>
+                  </li>
+                </ul>
+              </section>
+            </nav>
+            <!-- Off-canvas menu -->
+            <aside class="right-off-canvas-menu">
+              <ul class="off-canvas-list">
+                <li>
+                  <a class="home" href="/">Home</a>
+                </li>
+                <li>
+                  <a class="activities" href="/activities">Activities</a>
+                </li>
+                <li>
+                  <a class="attractions" href="/attractions">Attractions</a>
+                </li>
+                <li class="has-dropdown">
+                  <a class="lodging" href="/lodging">Lodging</a>
+                  <a class="toggle"></a>
+                  <ul>
+                    <li><a href="#">Bed &amp; Breakfasts</a></li>
+                    <li><a href="#">Cabins/Cottages</a></li>
+                    <li><a href="#">Campgrounds</a></li>
+                    <li><a href="#">Hotels/Motels</a></li>
+                    <li><a href="#">Vacation Homes</a></li>
+                  </ul>
+                </li>
+                <li>
+                  <a class="restaurants" href="/restaurants">Restaurants</a>
+                </li>
+                <li>
+                  <a class="shopping" href="/shopping">Shopping</a>
+                </li>
+                <li>
+                  <a class="calendar" href="/calendar">Calendar</a>
+                </li>
+              </ul>
+            </aside>
+            <!-- /Nav Menus -->
+
+            <!-- Header -->
+            <div class="row collapse header-content">
+              <div class="small-12 medium-7 columns header-image">
+                <!--<img src="assets/mtn_biker.png" width="100%" />-->
+              </div>
+              <div class="small-12 medium-5 columns content">
+                <h2>A World of Things to Do!</h2>
+                <hr />
+                <p>
+                  Adventure through boreal forests long beaches of sands and magnificent rocks. Experience stunning sunrises and sunsets that will fill your eyes. See historic architecture, friendly villages and majestic panoramas. The wild is here, yet mixed with a culture of people who thrive in it.
+                </p>
+                <div class="north"></div>
+              </div>
+            </div>
+            {if:!isHomePage}
+              {if:toolboxContent.breadCrumbs}
+                {toolboxContent.breadCrumbs:h}
+<!--                <div class="row">
+                  <ul class="breadcrumbs">
+                    <li><a href="/">Home</a></li>
+                    <li><a href="/lodging">Lodging</a></li>
+                    <li class="current">Campgrounds</li>
+                  </ul>
+                </div>-->
+              {end:}
+            {end:}
+
+            <!-- Content -->
+            <div class="row collapse" id="main">
+              <flexy:include src="toolbox.html">
+              <!-- ######### /Placeholder content ######### -->
+            </div>
+
+            <!-- Bottom -->
+            <div class="row  collapse bottom-content" flexy:if="isHomePage">
+              <div class="small-12 medium-5 columns content">
+                <h2>A World of Things to See!</h2>
+                <hr />
+                <p>
+                  Seek your extreme adventure right here! Epic hikes and biking. Snowfall, ski hills and snowmobile and water trails everywhere. Lake Superior cliffs, mines and caves all waiting to be discovered and visit the hundreds of freshwater shipwrecks.
+                </p>
+                <div class="north"></div>
+              </div>
+              <div class="small-12 medium-7 columns bottom-image"></div>
+            </div>
+
+            <!-- Footer -->
+            <footer class="row collapse">
+
+              <div class="small-12 medium-12 large-5 columns adventure-guide">
+                <div class="row collapse">
+                  <div class="small-3 columns text-center">
+                    <img src="{mediaBaseURL:h}assets/AdGuide_2014.png" />
+                  </div>
+                  <div class="small-9 columns text-center">
+                    <p>Get the Keweenaw Adventure Guide and Others!</p>
+                    <ul>
+                      <li><a href="#">View Online</a></li>
+                      <li><a href="#">Request by mail</a></li>
+                    </ul>
+                  </div>
+                </div>
+              </div>
+              <div class="small-12 medium-6 large-4 columns text-center video">
+                <a href="#"><img src="{mediaBaseURL:h}assets/video_image.png" /></a>
+                <p>View our Videos</p>
+              </div>
+              <div class="small-12 medium-6 large-3 columns weather">
+                <div class="right">
+                  <!-- WeatherUnderground widget -->
+                  <span style="display: block !important; width: 180px; text-align: center; font-family: sans-serif; font-size: 12px;"><a href="http://www.wunderground.com/cgi-bin/findweather/getForecast?query=zmw:49921.1.99999&bannertypeclick=wu_simplewhite" title="Houghton, Michigan Weather Forecast" target="_blank"><img src="http://weathersticker.wunderground.com/weathersticker/cgi-bin/banner/ban/wxBanner?bannertype=wu_simplewhite&airportcode=KCMX&ForcedCity=Dodgeville&ForcedState=MI&zip=49921&language=EN" alt="Find more about Weather in Houghton, MI" width="160" /></a></span>
+                </div>
+              </div>
+
+              <div class="row collapse contact">
+                  <ul class="small-12 columns">
+                    <li>56638 Calumet Avenue, Calumet, MI 49913</li>
+                    <li class="separator">(888) 766-0325 &bull; 906-337-4579</li>
+                    <li><a href="mailto:info@keweenaw.info">info@keweenaw.info</a></li>
+                  </ul>
+              </div>
+              <div class="row collapse copyright">
+                <ul class="small-12 columns">
+                  <li class="separator">&copy; <?php echo date('Y');?> Keweenaw Convention &amp; Visitor&apos;s Bureau</li>
+                  <li>Produced by <a href="http://www.gaslightmedia.com" target="_blank">Gaslight Media</a></li>
+                </ul>
+              </div>
+
+            </footer>
+            <!-- /Footer -->
+          </div>
+        </div>
+        <a class="exit-off-canvas"></a>
+      </div>
+    </div>
+
+    {bottomScripts:h}
+    <script src="{mediaBaseURL:h}js/foundation.min.js"></script>
+    <script>
+      $(document).foundation();
+    </script>
+    <script>
+      $(document).ready(function(){
+        $('.off-canvas-list').find('a.toggle').click(function(){
+            $(this).toggleClass('open');
+            $(this).siblings('ul').toggleClass('open');
+          });
+      });
+    </script>
+  </body>
 </html>
diff --git a/templates/toolbox.html b/templates/toolbox.html
new file mode 100644 (file)
index 0000000..ad0eebb
--- /dev/null
@@ -0,0 +1,67 @@
+{if:isHomePage}
+<!-- ######### Placeholder content ######### -->
+<h2 class="trees">{toolboxContent.primaryParagraph[title]}</h2>
+The Keweenaw is Michigan’s Copper Country! Here is where the largest fresh waters on earth create a peninsula called the Keweenaw. Where adventure falls from the sky, grows from the ground and springs from Lake Superior.
+<!-- ######### /Placeholder content ######### -->
+{else:}
+<!-- ######### Placeholder content ######### -->
+<div class="row">
+    {if:toolboxContent.primaryParagraph[image]}
+    <div class="small-12 medium-4 columns">
+        {toolboxContent.primaryParagraph[image]:h}
+    </div>
+    <div class="small-12 medium-8 columns">
+        <h2 class="left">{toolboxContent.primaryParagraph[title]}</h2>
+        {toolboxContent.primaryParagraph[description]:h}
+    </div>
+    {else:}
+    <div class="small-12 columns">
+        <h2 class="left">{toolboxContent.primaryParagraph[title]}</h2>
+        {toolboxContent.primaryParagraph[description]:h}
+    </div>
+    {end:}
+</div>
+
+{if:toolboxContent.profile}
+  {toolboxContent.profile:h}
+{end:}
+
+{if:toolboxContent.searchForm}
+  {toolboxContent.searchForm:h}
+{end:}
+
+{if:toolboxContent.searchResults}
+  {toolboxContent.searchResults:h}
+{end:}
+
+{if:toolboxContent.staticPageContent}
+<div class="row">
+  <div class="small-12 columns">
+  {toolboxContent.staticPageContent:h}
+  </div>
+</div>
+{end:}
+{if:toolboxContent.photos}
+{toolboxContent.photos:h}
+{end:}
+
+<div class="row" flexy:foreach="toolboxContent.secondaryParagraphs,section">
+    {if:section[image]}
+    <div class="small-12 medium-4 columns">
+        {section[image]:h}
+    </div>
+    <div class="small-12 medium-8 columns">
+        <h3>{section[title]}</h3>
+        {section[description]:h}
+        {section[files]:h}
+    </div>
+    {else:}
+    <div class="small-12 columns">
+        <h3>{section[title]}</h3>
+        {section[description]:h}
+        {section[files]:h}
+    </div>
+    {end:}
+</div>
+
+{end:}
\ No newline at end of file