Top simple navigation + left subnavigation + 1 column

With the Menu Manager you can easily split the navigation in two parts. On this page the top level in the page hierarchy is displayed horizontally and depending on what page is displayed a localized sub-menu is displayed vertically to the left. In this case the sub-menu to the left displays the sub-levels (children) to Default Templates Explained.

The {menu} tag

The {menu} tag is inserted twice in the page template. First where the main navigation is, which should only show the top level. It looks like this: {menu template='Simple Navigation' number_of_levels='1'}.

The sub navigation should only contain the second level and down, depending on what is selected on the first level. Also, the third level links should only display when its parent on the second level is clicked, otherwise they are hidden. That is, the second level is collapsed unless the current page has sub pages.

The tag for the sub navigation looks like this: {menu template='simple_navigation.tpl' start_level='2' collapse='1'}.

Attached style sheets for the menu

As the main navigation and the sub navigation need to be styled differently (one horizontal, the other vertical), two navigation style sheets are attached to this page template. Navigation Simple - Horizontal is for styling the horizontal main menu. Navigation Simple - Vertical on the other hand, contains the style for the sub navigation to the left.

Both using the same Menu Manager template

However, as you could see, both parts of the navigation are using the same menu manager template. That is because the output code is the same. It is only through CSS that the two parts get styled differently.

Floating the sidebar to the right

You can easily float the sidebar with the sub navigation to the right instead. Look in the Layout Top menu + 2 columns style sheet for the float:left; property in the div#sidebar element. Change that to float:right; and the sidebar with the menu will instead be on the right side of the content, of course you will also have to adjust the margins for the sidebar and the div#main, basically just swap the left and right margins.



Time: 0.049802 / SQL: 0.00906s for 39 queries / Net Memory: 1299760 / Peak: 1721832
Debug: (0.00036999999999998) - (net usage: 35616) - (peak: 393312)
Initialize Database
Debug: (0.001224) - (net usage: 79760) - (peak: 437464)
Done Initializing Database
Debug: (0.001255) - (net usage: 79920) - (peak: 437624)
initialize internal global cache
Debug: (0.001865) - (net usage: 189152) - (peak: 558624)
done initializing global cache
Debug: (0.001883) - (net usage: 188936) - (peak: 558624)
Loading Modules
Debug: (0.003195) - (net usage: 217592) - (peak: 583464)
End of Loading Modules
Debug: (0.003294) - (net usage: 218360) - (peak: 583464)
Initialize Smarty
Debug: (0.003304) - (net usage: 218520) - (peak: 583464)
Done Initialing Smarty
Debug: (0.003351) - (net usage: 235040) - (peak: 592744)
cms_content_cache: begin load needed content objects
Debug: (0.003487) - (net usage: 235592) - (peak: 593296)
cms_content_cache: end loading needed content objects
Debug: (0.003987) - (net usage: 268888) - (peak: 626592)
SELECT * FROM cms_content WHERE content_id = 14 LIMIT  1
Debug: (0.00455) - (net usage: 280360) - (peak: 638064)
process template top
Debug: (0.0049) - (net usage: 300976) - (peak: 658688)
SELECT * FROM cms_layout_templates WHERE id = 6 LIMIT  1
Debug: (0.006434) - (net usage: 345664) - (peak: 707936)
SELECT * FROM cms_content_props WHERE content_id = 14
Debug display of 'Start Load Smarty Plugin Navigator/function':(0.00805) - (net usage: 372488) - (peak: 734544)
Debug: (0.00833) - (net usage: 389864) - (peak: 747568)
SELECT * FROM cms_module_smarty_plugins ORDER BY module
Debug display of 'Start Load Smarty Plugin Search/function':(0.008648) - (net usage: 380600) - (peak: 747640)
Debug display of 'Start Load Smarty Plugin nav_breadcrumbs/function':(0.008951) - (net usage: 384176) - (peak: 747640)
Debug display of 'Start Load Smarty Plugin module_available/function':(0.009469) - (net usage: 387640) - (peak: 747640)
Debug display of 'End Load Smarty Plugin module_available/function':(0.00949) - (net usage: 388616) - (peak: 747640)
Debug: (0.011615) - (net usage: 412752) - (peak: 784008)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (1,2,11,22) AND active = 1 ORDER BY hierarchy
Debug: (0.011873) - (net usage: 470048) - (peak: 827752)
Start Navigator default action
Debug: (0.012148) - (net usage: 490088) - (peak: 847792)
SELECT * FROM cms_layout_templates WHERE name = 'Simple Navigation' LIMIT  1
Debug: (0.012676) - (net usage: 499232) - (peak: 856936)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (3,4,5,6,7,8,9,10) AND active = 1 ORDER BY hierarchy
Debug: (0.013291) - (net usage: 606360) - (peak: 964064)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (12,13,15,16,17,18) AND active = 1 ORDER BY hierarchy
Debug: (0.013844) - (net usage: 688928) - (peak: 1046632)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (23,30) AND active = 1 ORDER BY hierarchy
Debug: (0.019914) - (net usage: 855728) - (peak: 1292408)
End Navigator default action
Debug: (0.020223) - (net usage: 873744) - (peak: 1292408)
SELECT * FROM cms_layout_tpl_type WHERE originator = 'Search' AND name = 'searchform' LIMIT  1
Debug: (0.020566) - (net usage: 876752) - (peak: 1292408)
SELECT * FROM cms_layout_templates WHERE type_id = '10' AND type_dflt = 1 LIMIT  1
Debug: (0.021675) - (net usage: 867904) - (peak: 1292408)
Start Navigator breadcrumbs action
Debug: (0.02192) - (net usage: 886112) - (peak: 1292408)
SELECT * FROM cms_layout_tpl_type WHERE originator = 'Navigator' AND name = 'breadcrumbs' LIMIT  1
Debug: (0.022198) - (net usage: 888536) - (peak: 1292408)
SELECT * FROM cms_layout_templates WHERE type_id = '5' AND type_dflt = 1 LIMIT  1
Debug: (0.022662) - (net usage: 898864) - (peak: 1292408)
SELECT * FROM cms_content_props WHERE content_id = 11
Debug: (0.022971) - (net usage: 904320) - (peak: 1292408)
SELECT * FROM cms_content_props WHERE content_id = 12
Debug: (0.023239) - (net usage: 919048) - (peak: 1292408)
SELECT * FROM cms_content_props WHERE content_id = 13
Debug: (0.023598) - (net usage: 923608) - (peak: 1292408)
SELECT * FROM cms_content_props WHERE content_id = 15
Debug: (0.023912) - (net usage: 927272) - (peak: 1292408)
SELECT * FROM cms_content_props WHERE content_id = 16
Debug: (0.024108) - (net usage: 931304) - (peak: 1292408)
SELECT * FROM cms_content_props WHERE content_id = 17
Debug: (0.02441) - (net usage: 934168) - (peak: 1292408)
SELECT * FROM cms_content_props WHERE content_id = 18
Debug: (0.024676) - (net usage: 936424) - (peak: 1294128)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (19,20,21) AND active = 1 ORDER BY hierarchy
Debug: (0.024895) - (net usage: 942800) - (peak: 1300504)
SELECT * FROM cms_content_props WHERE content_id IN (19,20,21) ORDER BY content_id
Debug: (0.027312) - (net usage: 985752) - (peak: 1397856)
End Navigator breadcrumbs action
Debug: (0.027383) - (net usage: 966576) - (peak: 1397856)
Start Navigator default action
Debug: (0.027871) - (net usage: 985728) - (peak: 1443784)
End Navigator default action
Debug: (0.028236) - (net usage: 990120) - (peak: 1443784)
SELECT * FROM cms_layout_tpl_type WHERE originator = 'News' AND name = 'summary' LIMIT  1
Debug: (0.028543) - (net usage: 994912) - (peak: 1443784)
SELECT * FROM cms_layout_templates WHERE type_id = '6' AND type_dflt = 1 LIMIT  1
Debug: (0.028936) - (net usage: 1003640) - (peak: 1443784)
            SELECT SQL_CALC_FOUND_ROWS
                mn.*,
                mnc.news_category_name,
                mnc.long_name,
                u.username,
                u.first_name,
                u.last_name
            FROM cms_module_news mn
            LEFT OUTER JOIN cms_module_news_categories mnc
            ON mnc.news_category_id = mn.news_category_id
            LEFT OUTER JOIN cms_users u
            ON u.user_id = mn.author_id
            WHERE
                status = 'published'
            AND
        IF(start_time IS NULL AND end_time IS NULL,news_date <= NOW(),NOw() BETWEEN start_time AND end_time)ORDER BY mn.news_date desc LIMIT 0, 3
Debug: (0.029108) - (net usage: 1023264) - (peak: 1443784)
SELECT FOUND_ROWS() LIMIT  1
Debug: (0.029453) - (net usage: 1045544) - (peak: 1443784)
SELECT * FROM cms_module_news_fielddefs WHERE public = 1 ORDER BY item_order
Debug: (0.029758) - (net usage: 1048016) - (peak: 1443784)
SELECT * FROM cms_content WHERE content_id = 24 LIMIT  1
Debug: (0.03002) - (net usage: 1062864) - (peak: 1443784)
SELECT * FROM cms_module_news_categories ORDER BY hierarchy
Debug: (0.030218) - (net usage: 1064648) - (peak: 1443784)
SELECT news_category_id,COUNT(news_id) AS cnt FROM cms_module_news WHERE news_category_id IN (1) AND ( IFNULL(start_time, '1970-01-01 01:00:01') < '2025-12-06 04:10:51')  AND (( IFNULL(end_time, '1970-01-01 01:00:01') = '1970-01-01 01:00:01') OR (end_time > '2025-12-06 04:10:51'))  AND status = 'published' GROUP BY news_category_id
Debug: (0.038959) - (net usage: 1070536) - (peak: 1577112)
Start Navigator default action
Debug: (0.039126) - (net usage: 1088472) - (peak: 1577112)
SELECT * FROM cms_layout_tpl_type WHERE originator = 'Navigator' AND name = 'navigation' LIMIT  1
Debug: (0.039446) - (net usage: 1092816) - (peak: 1577112)
SELECT * FROM cms_layout_templates WHERE type_id = '4' AND type_dflt = 1 LIMIT  1
Debug: (0.040221) - (net usage: 1136944) - (peak: 1577112)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (25,26,27,28,29) AND active = 1 ORDER BY hierarchy
Debug: (0.040803) - (net usage: 1213840) - (peak: 1577112)
SELECT * FROM cms_content FORCE INDEX (cms_index_content_by_idhier) WHERE content_id IN (31,32) AND active = 1 ORDER BY hierarchy
Debug: (0.046469) - (net usage: 1251024) - (peak: 1685616)
End Navigator default action
Debug: (0.046732) - (net usage: 1252496) - (peak: 1685616)
SELECT * FROM cms_layout_templates WHERE name = 'footer' LIMIT  1
Debug: (0.049024) - (net usage: 1292912) - (peak: 1685616)
SELECT SQL_CALC_FOUND_ROWS S.id FROM cms_layout_stylesheets S LEFT JOIN cms_layout_design_cssassoc D ON S.id = D.css_id WHERE D.design_id = 9 ORDER BY D.item_order ASC LIMIT 0, 1000
Debug: (0.049199) - (net usage: 1310416) - (peak: 1685616)
SELECT FOUND_ROWS() LIMIT  1
Debug: (0.049539) - (net usage: 1343528) - (peak: 1701232)
SELECT id,name,content,description,media_type,media_query,created,modified FROM cms_layout_stylesheets WHERE id IN (9,8,10,3,7,2,13)