Setup template
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 22 Apr 2014 20:38:43 +0000 (20:38 +0000)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 22 Apr 2014 20:38:43 +0000 (20:38 +0000)
output toolbox content and blocks

Toolkit/Page.php
templates/template.html

index a5889ce..5e4cfa3 100755 (executable)
@@ -120,13 +120,13 @@ class Toolkit_Page
         Toolkit_NavigationFactoryAbstract $navFactory,
         Toolkit_Template_KeywordReplacement $keywordReplacement, $catid
     ) {
-        $this->_toolboxPage = $toolboxPage;
-        $this->_breadCrumbs = $breadCrumbsFactory;
-        $this->_pageGateway = $pageGatewayFactory->createGateway();
-        $this->_paragraphGateway = $paragraphGatewayFactory->createGateway();
-        $this->_navigationFactory = $navFactory;
+        $this->_toolboxPage        = $toolboxPage;
+        $this->_breadCrumbs        = $breadCrumbsFactory;
+        $this->_pageGateway        = $pageGatewayFactory->createGateway();
+        $this->_paragraphGateway   = $paragraphGatewayFactory->createGateway();
+        $this->_navigationFactory  = $navFactory;
         $this->_keywordReplacement = $keywordReplacement;
-        $this->_catid = $catid;
+        $this->_catid              = $catid;
 
         // determine the base url to use (for images and stylesheet urls)
         $this->mediaBaseURL = MEDIA_BASE_URL;
index 00bc2c2..06d1ad6 100644 (file)
 <!doctype html>
 <html>
-<head>
-<meta charset="UTF-8">
-<title>{pageTitle:h}</title>
-<link rel="stylesheet" href="styles.css" />
-<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
-{styles:h}
-{topScripts:h}
-</head>
+    <head>
+        <meta charset="UTF-8">
+        <title>{pageTitle:h}</title>
+        <meta name="description" content="{metaTags:h}">
+        {styles:h}
+        <link rel="stylesheet" href="{mediaBaseURL:h}styles.css" />
+        {topScripts:h}
+    </head>
 
-<body>
-<div id="container">
-    <header>
-        <div id="header_wrap"> <img id="logo" src="img/logo.png" width="140" height="165" alt="Cedarville Marine Logo" />
-            <h1><img src="img/wordmark.jpg" width="550" height="85" alt="Cedarville Marine - Serving the Les Cheneaux Islands recreational boating industry since 1984" /><!-- image is temporary - waiting for font from client --></h1>
-            <p class="tel">906.484.2815</p>
-            <ul>
-                <li><a href="#" title="Services">Services</a>
+    {if:isHomePage}
+    <body id="home">
+    {else:}
+    <body id="inside" class="pid{pageId} top{parentPageId}">
+    {end:}
+        <div id="container">
+            <header>
+            <div id="header_wrap"> <img id="logo" src="{mediaBaseURL:h}img/logo.png" width="140" height="165" alt="Cedarville Marine Logo" />
+                <h1><img src="{mediaBaseURL:h}img/wordmark.jpg" width="550" height="85" alt="Cedarville Marine - Serving the Les Cheneaux Islands recreational boating industry since 1984" /><!-- image is temporary - waiting for font from client --></h1>
+                <p class="tel">906.484.2815</p>
+                <ul>
+                    <li><a href="#" title="Services">Services</a>
                     <ul>
                         <li><a href="#" title="Capabilities">Capabilities</a></li>
                         <li><a href="#" title="Service Forms">Service Forms</a>
-                            <ul>
-                                <li><a href="#" title="Service Request">Service Request</a></li>
-                                <li><a href="#" title="Launch Request">Launch Request</a></li>
-                                <li><a href="#" title="Temporary Storage">Temporary Storage</a></li>
-                            </ul>
+                        <ul>
+                            <li><a href="#" title="Service Request">Service Request</a></li>
+                            <li><a href="#" title="Launch Request">Launch Request</a></li>
+                            <li><a href="#" title="Temporary Storage">Temporary Storage</a></li>
+                        </ul>
                         </li>
                         <li><a href="#" title="Seaweed Removal">Seaweed Removal</a></li>
                     </ul>
-                </li>
-                <li><a href="#" title="Store">Store</a>
+                    </li>
+                    <li><a href="#" title="Store">Store</a>
                     <ul>
                         <li><a href="#" title="Summer Gear">Summer Gear</a>
-                            <ul>
-                                <li><a href="#" title="Apparel">Apparel</a></li>
-                                <li><a href="#" title="Tubes & Rafts">Tubes &amp; Rafts</a></li>
-                                <li><a href="#" title="Boating Accessories">Boating Accessories</a></li>
-                            </ul>
+                        <ul>
+                            <li><a href="#" title="Apparel">Apparel</a></li>
+                            <li><a href="#" title="Tubes & Rafts">Tubes &amp; Rafts</a></li>
+                            <li><a href="#" title="Boating Accessories">Boating Accessories</a></li>
+                        </ul>
                         </li>
                         <li><a href="#" title="Winter Gear">Winter Gear</a>
-                            <ul>
-                                <li><a href="#" title="Apparel">Apparel</a></li>
-                                <li><a href="#" title="Snowmobile Accessories">Snowmobile Accessories</a></li>
-                            </ul>
+                        <ul>
+                            <li><a href="#" title="Apparel">Apparel</a></li>
+                            <li><a href="#" title="Snowmobile Accessories">Snowmobile Accessories</a></li>
+                        </ul>
                         </li>
                         <li><a href="#" title="Snowmobile & ATV's">Snowmobile &amp; ATV's</a></li>
                     </ul>
-                </li>
-                <li><a href="#" title="Facilities">Facilities</a>
+                    </li>
+                    <li><a href="#" title="Facilities">Facilities</a>
                     <ul>
                         <li><a href="#" title="Marina">Marina</a></li>
                         <li><a href="#" title="Snow Shop">Snow Shop</a></li>
                         <li><a href="#" title="Rates">Rates</a></li>
                     </ul>
-                </li>
-                <li><a href="#" title="Storage">Storage</a>
+                    </li>
+                    <li><a href="#" title="Storage">Storage</a>
                     <ul>
                         <li><a href="#" title="Facility">Facility</a></li>
                         <li><a href="#" title="Storage Agreement">Storage Agreement</a></li>
                     </ul>
-                </li>
-                <li><a href="#" title="Area Information">Area Information</a>
+                    </li>
+                    <li><a href="#" title="Area Information">Area Information</a>
                     <ul>
                         <li><a href="#" title="Area Weather">Area Weather</a>
-                            <ul>
-                                <li><a href="#" title="Cedarville">Cedarville</a></li>
-                                <li><a href="#" title="DeTour">DeTour</a></li>
-                                <li><a href="#" title="Mackinac Island">Mackinac Island</a></li>
-                            </ul>
+                        <ul>
+                            <li><a href="#" title="Cedarville">Cedarville</a></li>
+                            <li><a href="#" title="DeTour">DeTour</a></li>
+                            <li><a href="#" title="Mackinac Island">Mackinac Island</a></li>
+                        </ul>
                         </li>
                         <li><a href="#" title="Local Attractions">Local Attractions</a></li>
                         <li><a href="#" title="Events">Events</a></li>
                         <li><a href="#" title="Organizations">Organizations</a></li>
                     </ul>
-                </li>
-                <li><a href="#" title="About Us">About Us</a>
+                    </li>
+                    <li><a href="#" title="About Us">About Us</a>
                     <ul>
                         <li><a href="#" title="History">History</a></li>
                         <li><a href="#" title="Staff">Staff</a></li>
                         <li><a href="#" title="Hours of Operation">Hours of Operation</a></li>
                     </ul>
-                </li>
-                <li><a href="#" title="Contact">Contact</a></li>
-            </ul>
-        </div><!-- header_wrap --> 
-    {styles:h}
-{topScripts:h}
-</header>
-    <section id="hero">
-        <div id="hero_wrap">
-        <!-- slideshow -->
-            <div id="quicklink_wrap">
-                <div class="quicklink_block">
-                    <h2>Summer Gear</h2>
-                    <ul>
-                        <li>Apparel</li>
-                        <li>Tubes &amp; Rafts</li>
-                        <li>Boat Accessories</li>
-                    </ul>
-                </div>
-                <div class="quicklink_block">
-                    <h2>Docks Available</h2>
-                </div>
-                <div class="quicklink_block">
-                    <h2>Seaweed Removal</h2>
-                </div>
-                <div class="quicklink_block last_q_block">
-                    <h2>Boat &amp; Engine Repair</h2>
-                </div>
-            </div><!-- quicklink_wrap --> 
-        </div>
-        <!-- hero_wrap --> 
-    </section>
-    <!-- hero -->
-    <section id="content">
-        <div id="content_wrap">
-            <div id="left_col">
-            <div id="toolbox">
-                <div id="category">
-                    <p>Cedarville Marine is a full service marina and ship's store located on the waterfront in beautiful downtown Cedarville, Michigan. We offer:</p>
-                    <ul>
-                        <li>Mercury / Mercruiser and OMC motor services</li>
-                        <li>Mercury / Mercruiser, Evinrude BRP, &amp; Arctic Cat sales and repair</li>
-                        <li>Outboard &amp; inboard boat motor repair</li>
-                        <li>Boat storage &amp; boat shrink wrapping</li>
-                    </ul>
+                    </li>
+                    <li><a href="#" title="Contact">Contact</a></li>
+                </ul>
+            </div><!-- header_wrap -->
+            </header>
+            <section id="hero">
+            <div id="hero_wrap">
+                <!-- slideshow -->
+                <div id="quicklink_wrap">
+                    <div class="quicklink_block">
+                        <h2>Summer Gear</h2>
+                        <ul>
+                            <li>Apparel</li>
+                            <li>Tubes &amp; Rafts</li>
+                            <li>Boat Accessories</li>
+                        </ul>
+                    </div>
+                    <div class="quicklink_block">
+                        <h2>Docks Available</h2>
+                    </div>
+                    <div class="quicklink_block">
+                        <h2>Seaweed Removal</h2>
+                    </div>
+                    <div class="quicklink_block last_q_block">
+                        <h2>Boat &amp; Engine Repair</h2>
+                    </div>
+                </div><!-- quicklink_wrap -->
+            </div>
+            <!-- hero_wrap -->
+            </section>
+            <!-- hero -->
+            <section id="content">
+            <div id="content_wrap">
+                <div id="left_col">
+                    <div id="toolbox">
+                        {toolboxContent:h}
+                    </div><!-- toolbox -->
+
+                    <!-- **************************************************************************** GLM Blocks from another web site... ******************************************* -->
+
+                    <section flexy:if="hasHeadlines" id="hHlines" class="opensearchserver.ignore">
+                    <h2>Headlines</h2><!-- this is not needed and is set to display:none; in the css -->
                     <ul>
-                        <li>25 ton travel lift</li>
-                        <li>Seasonal &amp; Transient dockage</li>
-                        <li>Gas &amp; Diesel</li>
-                        <li>Pump-out station &amp; Trash disposal</li>
+                        <li flexy:foreach="headlines,v" class="hHlinesItem">
+                            <h3>
+                            {if:v[external]}
+                            <a href="{v[href]:h}" class="hHlinesHeaderLink" target="_blank">
+                            {else:}
+                            <a href="{v[href]:h}" class="hHlinesHeaderLink">
+                            {end:}
+                            {v[header]:h}</a></h3>
+                            {if:v[img]}
+                                {if:v[external]}
+                                <a href="{v[href]:h}" class="hHlinesImageLink" target="_blank">
+                                {else:}
+                                <a href="{v[href]:h}" class="hHlinesImageLink" target="_blank">
+                                {end:}
+                                <img src="{v[img]:h}" alt="Home page headline image">
+                            </a>
+                            {end:}
+                            <p>{v[descr]:h}<span class="hHlinesMore"> <a href="{v[href]:h}" class="hHlinesMoreLink">More ></a></span></p>
+                        </li><!-- /.hHlinesItem -->
                     </ul>
-                    <div class="hr_graphic"></div><!-- hr_graphic -->
-                    
-                    <div class="imageright" >
-                        <img alt="is82-1354654029-02462.jpeg" title="Gaylord To Mackinaw Trail Ride" src="../../../Desktop/pic-spotlight-mackinac-island-8-09.jpg">
-                        <div class="imagecaption">This is a caption for images</div>
-                    </div><!-- imageright -->
-                    </div><!-- category -->
-                </div><!-- toolbox -->
-                
-                <!-- **************************************************************************** GLM Blocks from another web site... ******************************************* -->
-                
-                <section flexy:if="hasHeadlines" id="hHlines">
-  <h2>Headlines</h2><!-- this is not needed and is set to display:none; in the css -->
-  <ul>
-  
-    <li class="hHlinesItem">
-     <img src="http://www.viewsofthepast.com/photos/towns/Towns_C/to-cdrv-001.jpg" alt="Home page headline image">
-      <h3><a href="{v[href]:h}">the title</a></h3>
-      <p>This is a paragraph</p>
-      <p class="hHlinesMore"><a href="{v[href]:h}">Read More</a></p>
-    </li><!-- /.hHlinesItem -->
-    
-    <li class="hHlinesItem">
-     <img src="http://www.viewsofthepast.com/photos/towns/Towns_C/to-cdrv-002.jpg" alt="Home page headline image">
-      <h3><a href="{v[href]:h}">the title</a></h3>
-      <p>This is a paragraph</p>
-      <p class="hHlinesMore"><a href="{v[href]:h}">Read More</a></p>
-    </li><!-- /.hHlinesItem -->
-    
-    <li class="hHlinesItem">
-      <h3><a href="{v[href]:h}">the title</a></h3>
-      <p>This is a paragraph</p>
-      <p class="hHlinesMore"><a href="{v[href]:h}">Read More</a></p>
-    </li><!-- /.hHlinesItem -->
-  </ul>
-</section><!-- /#hHlines -->
-   
-                
-                
-            </div><!-- left_col -->
-            
-            <div id="right_col"> <a href="#" title="Get directions to our store" ><img src="img/google_maps.jpg" width="251" height="183" alt="Get directions to our store"/></a> <a href="#" title="Weather Widget"><!-- TEMPORARY :: Replace with actual weather widget --><img src="img/weather_temp.jpg" /></a> <a href="#" title="Great Lakes Lake Levels (USACE)">Great Lakes Lake Levels (USACE)</a> <a href="#" title="Find Us on Facebook"><img src="img/facebook.gif" width="251" height="82" alt="Find Us on Facebook" /></a> </div>
-            <!-- right_col --> 
+                    </section><!-- /#hHlines -->
+
+
+
+                </div><!-- left_col -->
+
+                <div id="right_col"> <a href="#" title="Get directions to our store" ><img src="{mediaBaseURL:h}img/google_maps.jpg" width="251" height="183" alt="Get directions to our store"/></a> <a href="#" title="Weather Widget"><!-- TEMPORARY :: Replace with actual weather widget --><img src="{mediaBaseURL:h}img/weather_temp.jpg" /></a> <a href="#" title="Great Lakes Lake Levels (USACE)">Great Lakes Lake Levels (USACE)</a> <a href="#" title="Find Us on Facebook"><img src="{mediaBaseURL:h}img/facebook.gif" width="251" height="82" alt="Find Us on Facebook" /></a> </div>
+                <!-- right_col -->
+            </div>
+            <!-- content_wrap -->
+            </section>
+            <footer>
+            <address>
+                <ul>
+                    <li class="adr">Cedarville Marine, 100 E Hodeck St, Cedarville,  MI 49719</li>
+                    <li><img src="{mediaBaseURL:h}img/footer_elipse.png" alt="graphic element" /></li>
+                    <li class="geo">45&deg;59’41.68”  &mdash;  84&deg;21’33.97”</li>
+                    <li><img src="{mediaBaseURL:h}img/footer_elipse.png" alt="graphic element" /></li>
+                    <li class="tel">906.484.2815</li>
+                    <li><img src="{mediaBaseURL:h}img/footer_elipse.png" alt="graphic element" /></li>
+                    <li><a href="#" >Contact Us</a></li>
+                </ul>
+            </address>
+            <p class="copyright">Copyright &copy;i<?php echo date('Y');?>, Cedarville Marine.  Produced by Gaslight Media, All Rights Reserved</p>
+            </footer>
         </div>
-        <!-- content_wrap --> 
-    </section>
-    <footer>
-        <address>
-        <ul>
-            <li class="adr">Cedarville Marine, 100 E Hodeck St, Cedarville,  MI 49719</li>
-            <li><img src="img/footer_elipse.png" alt="graphic element" /></li>
-            <li class="geo">45&deg;59’41.68”  &mdash;  84&deg;21’33.97”</li>
-            <li><img src="img/footer_elipse.png" alt="graphic element" /></li>
-            <li class="tel">906.484.2815</li>
-            <li><img src="img/footer_elipse.png" alt="graphic element" /></li>
-            <li><a href="#" >Contact Us</a></li>
-        </ul>
-        </address>
-        <p class="copyright">Copyright &copy;2014, Cedarville Marine.  Produced by Gaslight Media, All Rights Reserved</p>
-    </footer>
-</div>
-<!-- container --> 
-<script>
-$("#header_wrap>ul>li").hover( function(){
-    console.log(this);
-    $(this).children("ul").addClass("subMenu");
-    $('li:has(> ul)').css("border-bottom","0");//remove bottom border from any li that has child ul
-}, function(){
-    $(this).children("ul").removeClass("subMenu");
-}
+        <!-- container -->
+        <script>
+            $("#header_wrap>ul>li").hover( function(){
+                console.log(this);
+                $(this).children("ul").addClass("subMenu");
+                $('li:has(> ul)').css("border-bottom","0");//remove bottom border from any li that has child ul
+                }, function(){
+                $(this).children("ul").removeClass("subMenu");
+            }
 
 
-);
-</script>
-{bottomScripts:h}
-</body>
+            );
+        </script>
+        {bottomScripts:h}
+    </body>
 </html>