Question about Horizontal Navigation

Question about Horizontal Navigation

by Nathan Bray -
Number of replies: 3
Hi is there anyone out there that can give me some advice on exactly where and what code I need to insert in order to create a horizontal "suckerfish" type menu that would match my home page? I am a newbie to PHP/CSS/etc but was wondering if this needs to be done with "includes" and how I would do that....

My goal is to create a horizontal menu between the logo header and breadcrumbs navigation that will have some fixed navigation items such as Home (Main domain page), Contact, Members Area (Moodle Main page), and Course Categories with a drop down of available courses.

The problem I am having is what code to insert and where. When I used Firefox Firebug to test just copying and pasting the html I pulled from my main page that has navigation I am able to see a navigation menu that is styled using CSS but then when I enter that same code into the header.html in the standard template then it does not work.

Any help would be appreciated or a private message. Thank you very much in advance.

Nathan B
Average of ratings: -
In reply to Nathan Bray

Re: Question about Horizontal Navigation

by Mark Berthelemy -
Hi Nathan,

You're going to have to insert some custom PHP code in the header.html file of your theme. This would create the list items which would then be rendered with the appropriate CSS.

The PHP would need to extract the courses and categories, for that part of the menu, from the database. (Eg. http://www.longrow.derbyshire.sch.uk/moodle/ which puts the top level categories in a horizontal menu). The links which will not be generated dynamically (eg. Home, Contact, Members Area) can be hard-coded as HTML.

I suggest following the instructions at http://www.alistapart.com/articles/horizdropdowns for creating the HTML and CSS. To create the PHP in the header.html for Moodle won't be too hard. If you're putting it into your main site as well, you'll need some extra PHP to make the connection to the Moodle database.

Does that help?

Mark
In reply to Mark Berthelemy

Re: Question about Horizontal Navigation

by Nathan Bray -
Hi Mark thanks for the reply. I did receive a recommendation from another member also using the newbury "college_blue" theme header.html and was able to find a solution but I'll take a look at these sites also.
In reply to Nathan Bray

Re: Question about Horizontal Navigation

by Shaun Daubney -
Any questions on "college_blue" give me a shout - there's also a LOT of stuff about the menu here.