Thomas, How do I set this tag? My meta info is: --- title: Aaron in_menu: true change_freq: monthly created_at: 2008-09-3 11:25:34 +05:00 sort_info: 20 webgen-menu-level2: true --- I get no errors, but the class is still webgen-menu-level1 instead of webgen-menu-level2 when rendering the site. Where do I need to set this? The main menu is horizontal at the top and the sub menu is on the right side bar. In the default template I have the first menu: <div id="nav"> {menu: {used_nodes: files, start_level: 1, max_levels: 1}} </div> Then for the sub menu: <div id="sidebar"> <% if node.level > 1 %> <h3>Sub Menu</h3> {menu: {used_nodes: files, start_level: 2}} </ul> <% end %> </div> Thanks, Sven
> How do I set this tag?This is no tag, it is a class that is set on the <li> tag automatically by the menu tag, so you can''t set it own your own or change it. It does not relate to the node level, it is just used to specify the levels of a generated menu. So webgen-menu-levelNUMBER always starts with 1, even when the `tag.menu.start_level` option is set to another value.> My meta info is: > --- > title: Aaron > in_menu: true > change_freq: monthly > created_at: 2008-09-3 11:25:34 +05:00 > sort_info: 20 > webgen-menu-level2: true > ---You can remove the webgen-menu-level2 entry, it is not used by webgen.> I get no errors, but the class is still webgen-menu-level1 instead of > webgen-menu-level2 when rendering the site. Where do I need to set > this? The main menu is horizontal at the top and the sub menu is on > the right side bar. > > In the default template I have the first menu: > <div id="nav"> > {menu: {used_nodes: files, start_level: 1, max_levels: 1}} > </div> > > Then for the sub menu: > <div id="sidebar"> > <% if node.level > 1 %> > <h3>Sub Menu</h3> > {menu: {used_nodes: files, start_level: 2}} > </ul> > <% end %> > </div>This looks alright. I guess you need the class to style the menu? Then you can use nested CSS definitions to style the nav entries and the sidebar entries like this: #nav li.webgen-menu-level1 { some-css-key: some-value; } #sidebar li.webgen-menu-level1 { some-css-key: some-value; } Since you already have the menus surrounded by <div>-tags with id-attributes, it is easy to just style one or the other: Use the #sidebar or #nav as scope! -- Thomas
Could you please provide an example for me on using this? #nav li.webgen-menu-level1 { some-css-key: some-value; } #sidebar li.webgen-menu-level1 { some-css-key: some-value; } Do I set this in the default template and if so would it be: <div id="sidebar"> <% if node.level > 1 %> <h3>Sub Menu</h3> { some-css-key: some-value; } {menu: {used_nodes: files, start_level: 2}} <% end %> </div> Then in the page file: --- title: Aaron in_menu: true change_freq: monthly created_at: 2008-09-3 11:25:34 +05:00 sort_info: 20 css_key: true --- It would help me to have a visual to see. Thanks, Sven
Am Wed, 3 Sep 2008 11:22:32 -0700 (PDT) schrieb Sven <sven.was.here at gmail.com>:> Could you please provide an example for me on using this? > > #nav li.webgen-menu-level1 { some-css-key: some-value; } > #sidebar li.webgen-menu-level1 { some-css-key: some-value; }Theses are CSS rules and they have to go to a .css file (or in the appropriate header section). The default template just inlcudes the <div>-tags with the id-attribute and the webgen menu tags. They define what will be on a page. The CSS file defines how the page will look, so you clearly need to adapt these two lines to your liking by using the actual CSS paths and CSS key-value pairs that you need. I''m sorry that I can''t help you better, I can''t explain HTML and CSS here in full, have a look at tutorials or read a book about the topic. An easier way would be to use a website template that was shipped with webgen. Or you could look at one to see how it is done. -- Thomas