JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
hilight current nav item, visual cleanup
[wfpl-cms.git] / code / cms.php
index eacff25..d8b6452 100644 (file)
@@ -1,9 +1,13 @@
 <?php
 
 function cms_display($basename, &$tem) {
+       $tem->set('$host', this_host());
        $nav_items = db_get_assocs('cms_pages', "coalesce(nullif(nav_title,''), title) as title,filename", 'where navbar!=0 order by navbar');
        if($nav_items) {
                foreach($nav_items as &$nav_item) {
+                       if($nav_item['filename'] == $basename) {
+                               $nav_item['current'] = true;
+                       }
                        if($nav_item['filename'] == 'index') {
                                $nav_item['filename'] = './';
                        }