SiteMap
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 13 Aug 2014 20:52:18 +0000 (16:52 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 13 Aug 2014 20:52:18 +0000 (16:52 -0400)
Output the site-map

Toolkit/Template/Page/SiteMap.php
templates/toolbox.html

index 6cf1a99..392bd66 100644 (file)
@@ -77,13 +77,15 @@ class Toolkit_Template_Page_SiteMap
     {
         $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'css/siteMap.css';
         $navArray = $this->getNavArray(0);
-        $page     = new stdClass();
+        $tPage     = new stdClass();
         $tpl      = new HTML_Template_Flexy(
             $GLOBALS['flexyOptions']
         );
-        $page->nav = $navArray;
-        $tpl->compile('siteMap.html');
-        return $tpl->bufferedOutputObject($page);
+        $tPage->nav = $navArray;
+//        echo '<pre>'.print_r($tPage, true).'</pre>';exit;
+//        $tpl->compile('siteMap.html');
+        return $tPage;
+//        return $tpl->bufferedOutputObject($page);
     }
 
     //    }}}
index 3dadb2b..17b818f 100644 (file)
     {end:}
 </div>
 
+{end:}
+{if:toolboxContent.nav}
+<div id="sitemap">
+  <ol>
+    <li flexy:foreach="toolboxContent.nav,main">
+      <h2><a href="{main[url]:h}">{main[label]:h}</a></h2>
+      {if:main[subs]}
+      <?php
+      $t->chunks = array_chunk($main['subs'], 3, true);
+      ?>
+        <div class="row" flexy:foreach="chunks,chunky">
+          <ol>
+            <li flexy:foreach="chunky,chunk">
+              <a href="{chunk[url]:h}">{chunk[label]:h}</a>
+              {if:chunk[subs]}
+              <ol>
+                <li flexy:foreach="chunk[subs],subs,sChunk">
+                  <a href="{sChunk[url]:h}">{sChunk[label]:h}</a>
+
+                      {if:sChunk[subs]}
+                      <ol>
+                        <li flexy:foreach="sChunk[subs],subs2,sChunk2">
+                          <a href="{sChunk2[url]:h}">{sChunk2[label]:h}</a>
+                        </li>
+                      </ol>
+                      {end:}
+                </li>
+              </ol>
+              {end:}
+            </li>
+          </ol>
+        </div>
+      {end:}
+    </li>
+  </ol>
+</div>
 {end:}
\ No newline at end of file