Floating navigation menu in 1.5 themes

Floating navigation menu in 1.5 themes

by Martin Dougiamas -
Number of replies: 12
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
It's probably not well known that it's possible to add a floating navigation menu to Moodle 1.5 via custom themes (because I haven't seen anyone using it yet).

If you look in the theme config.php you'll see this switch:

$THEME->makenavmenulist = false;

/// By setting this to true, then you will have access to a
/// new variable in your header.html and footer.html called
/// $navmenulist ... this contains a simple XHTML menu of
/// all activities in the current course, mostly useful for
/// creating popup navigation menus and so on.


You can then include the XHTML in your header or footer, and combine it with Javascript to create menus that work/look like the floater on this page, for example (look in the top left):
  
    http://www.thailandguru.com/infra-electricity.html
Average of ratings: Useful (1)
In reply to Martin Dougiamas

Re: Floating navigation menu in 1.5 themes

by Julian Ridden -
nice looking feature. I will see if I can find a way to implement it in our site.

Any other little titbits for us to discover taht you can share? smile
In reply to Julian Ridden

Re: Floating navigation menu in 1.5 themes

by jose miguel -
Hi, I can view the menu, but the menu appear on foot of the page, I want that appear on left of table content. How can do it?

Thanks a lot.

PD: sorry for my bad english
In reply to Martin Dougiamas

Re: Floating navigation menu in 1.5 themes

by Jean-Marc Loisil -
I was just testing it yesterday but as I saw nothing happening I gave up. Actually I thought it was a form-like dropdown menu.
I will try again but I am not sure to implement it as the navigation is already pretty straightforward if you use the good blocks.
In reply to Jean-Marc Loisil

Re: Floating navigation menu in 1.5 themes

by Genner Cerna -
I was looking in the config.php, I could not find as Martin told so.
In reply to Genner Cerna

Re: Floating navigation menu in 1.5 themes

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Genner, config.php may be found within in a particular theme folder. smile

Julian, have you noticed that you can configure mp3 player colours and choose whether the mp3 file downloads automatically or waits until the play button is pressed? thoughtful

Re. drop-down menus, I found Zeldman's comments interesting. wink
http://www.zeldman.com/daily/0604f.shtml#ala184
In reply to Helen Foster

Re: Floating navigation menu in 1.5 themes

by Genner Cerna -
I found it, how do I add in header.html? what code?
In reply to Genner Cerna

Re: Floating navigation menu in 1.5 themes

by Jean-Marc Loisil -
The following code should work even if with my local server (esayphp) nothing appears smile

<?php echo $navmenulist ?>
In reply to Jean-Marc Loisil

Re: Floating navigation menu in 1.5 themes

by Audun Hauge -
For this to work you must view a module.
The navmenu is constructed in mod/xxx/yyy.php (where yyy is view, index etc), thus you won't see it in a course - you must enter a module (activity).

In reply to Audun Hauge

Re: Floating navigation menu in 1.5 themes

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
I am puzzled by this navmenulist thing.wide eyes
Using 1.5 I have set $THEME->makenavmenulist = true; in config.php
In the header.html file I have put <?php echo $navmenulist ?>
but nothing happens

This looks like a dead thread. Has anyone actually managed to get the navmenulist to work? Exactly how?

Audun, what do you mean by "For this to work you must view a module"?

Any help appreciated,

Joseph

In reply to Joseph Rézeau

Re: Floating navigation menu in 1.5 themes

by Samuli Karevaara -
"You must view a module" means that it doesn't show up on the course front page, but does for example when viewing a discussion forum.

But it doesn't work at all if the course has a course theme set. I filed a bug #4468 for this. This means that it only works for the global "site theme".
In reply to Helen Foster

Re: Floating navigation menu in 1.5 themes

by Julian Ridden -
Found it the other day. Haven't muddles with it yet.

Would like to see a way of adding a background image to the flashplayer at some point.

I definatly need to get my player off that black on black look smile
In reply to Martin Dougiamas

Re: Floating navigation menu in 1.5 themes

by Sylvain Houmeau -
Hi Martin,
I am very much interested in this floating menu. I think I can manage with the config.php but I don't where to find the proper code to make a tree menu like this. I understand this is javascript. Do you have a sample for us?
Thank you.