Navigation menu - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: Navigation menu (/showthread.php?tid=5068) |
Navigation menu - rpetges - 2013-08-16 Hi, I downloaded a HTML5 theme and would like to integrate GetSimple CMS. However, I'm stuck with the navigation. In the original HTML5 theme, navigation is build using following code : <nav id="nav"> <a href="index.html" class="current-page-item">Homepage</a> <a href="twocolumn1.html">Two Column #1</a> <a href="twocolumn2.html">Two Column #2</a> <a href="onecolumn.html">One Column</a> <a href="threecolumn.html">Three Column</a> </nav> How can I integrate this into GetSimple ? Many thanks for your help, Romain RE: Navigation menu - Timbow - 2013-08-16 Normally you would write the nav like this: Code: <nav id="nav"> You cannot in a GetSimple theme template specify what pages are actually included in the site. It is very normal to code the nav as an unordered list ( <ul> ), I don't know why your page just has a series of <a> elements not in a list, but in GetSimple it has to be a list, so use the <ul> tags. RE: Navigation menu - rpetges - 2013-08-16 Thanks for the reply. I already tried this but this totally breaks the navigation ... seems that I need to make major CSS modifications. Is there a way in GetSimple to get a list of all pages and manually build the navigation as required by this theme ? Romain RE: Navigation menu - Timbow - 2013-08-16 I can't know what you are trying to do, but it doesn't look difficult. I would guess that where your css has styling for the menu it will be nav a {declaration; declaration;} and for GetSimple you would need to make it nav li {declaration; declaration; } but I could be wrong. for the different pages: in GetSimple you can define different page layouts (two column, three column) as different page templates in your theme, so you will make several template files (template.php (the default), onecolumn.php , threecolumn.php). When the theme is activated the menu is built as you create pages and assign a page template to each new page. it is easier to do than explain. RE: Navigation menu - rpetges - 2013-08-16 Thanks Timbow, I think I understood what I have to do ... will try your suggestion. Regards, Romain RE: Navigation menu - Timbow - 2013-08-16 (2013-08-16, 08:10:13)rpetges Wrote: Thanks Timbow, Careful. I may have told you something wrong: Styling a nav menu as a list - I think you apply styles to the <a> element rather than the <li> element. Can't remember why. RE: Navigation menu - rpetges - 2013-08-16 I replaced the complete <a> navigation by an unordered list ... it works great. However, I have another question: In the navigation menu, I would like to put a menu entry that points to an index page for a forum. For example, http://mydomain.com/forum should be linked to the Forum navigation menu entry. Any idea on how to accomplish that ? Thank you for your support. Romain RE: Navigation menu - Timbow - 2013-08-16 An easy way to add an external link is to add it to the end of the nav <ul> like this: Code: <nav id="nav"> More than that requires a plugin. I think the i18n plugin allows you to add links to your menu but i have never used it. PS Carlos' redirect plugin, new today will let you add a menu entry, see http://get-simple.info/forums/showthread.php?tid=5070 RE: Navigation menu - shawn_a - 2013-08-17 The 'menuitems' hook is called at the end of get_navigation. You could use my hook_components plugin to add these via a component fairly easily. Edit: nevermind menuitems is a filter, so disregard that RE: Navigation menu - rpetges - 2013-08-17 Thanks for the suggestions. @shawn_a : Maybe it would be a good idea to include navigation functionality to external or internal links in the core for future versions. Regards, Romain RE: Navigation menu - shawn_a - 2013-08-17 You mean aside from the plugin filter ? already scheduled for 3.3 RE: Navigation menu - rpetges - 2013-08-17 Great ! Thanks for the feedback. Romain |