Moodle2 Theme Settings -> Custom Menu Items Static list only?

Moodle2 Theme Settings -> Custom Menu Items Static list only?

deur Michael O'Brien -
Getal antwoorde: 10

The custom menu items entry in Theme Settings Custom Meni Items says "You can configure a custom menu here to be shown by themes. Each line consists of some menu text, a link URL (optional) and a tooltip title (optional), separated by pipe characters. You can specify a structure using hyphens"

This lets you build static lists of menu items but is it possible to add dynamic lists like

  • "all courses from a particular catagory" for example or
  • a users registered courses or
  • the last 5 forum posts they contributed either to

by adding in custom php or referencing tokens some CMS's like drupal use [user] would provide the username of the logged in user  and [site-url] gives you the homepage of the site

[user] common links

- Support|http://moodle.org/support

-Home |[site-url]

Would give you a custom menu for user fred of

fred.smith common links

Support

Home

 

Do custom menu items depend on what the theme developer has decided they will make available?

A list of drupal tokens are available here

Gemiddeld van beoordelings: -
In antwoord op Michael O'Brien

Re: Moodle2 Theme Settings -> Custom Menu Items Static list only?

deur Richard Oelmann -
Prentjie van Core developers Prentjie van Plugin developers Prentjie van Testers

Michael,

The custommenu box from theme settings is basically a static list. However, there are themes and variations such as those using awesomebar (like decaf, where it was first developed) that show that you can do just about anything you want by overriding the custommenu renderer in the theme code - to that extent, yes additional (or dynamic) items do rely on what the theme developer puts in.

Richard

Gemiddeld van beoordelings: -
In antwoord op Michael O'Brien

Re: Moodle2 Theme Settings -> Custom Menu Items Static list only?

deur Mary Evans -

Hi Michael,

"Do custom menu items depend on what the theme developer has decided they will make available?"

In a nutshell NO. All Moodle CORE themes allow the inclusion of a Custom Menu. To populate the menu in a CORE theme, you need to follow the instructions towards the bottom of the 'Themes settings' page which can be found by going to the following location in your Moodle 2.x.x installation:

Settings > Site Administration > Appearance > Themes > Theme settings...

The instructions are similar to what you have written above. As Administrator you can add the menu items as you want them to look/work in the same mode as the 'Example' menu given in the instructions.

The menu only takes effect when you add an item, other wise the menu is not visible.

I hope this answers your question?

Mary

Gemiddeld van beoordelings: -
In antwoord op Mary Evans

Re: Moodle2 Theme Settings -> Custom Menu Items Static list only?

deur Richard Oelmann -
Prentjie van Core developers Prentjie van Plugin developers Prentjie van Testers

Hi Mary/Michael,

I'm sorry if I created any confusion - I took Michael's question as asking if additional/dynamic menu features depended on what the theme designer had put in, rather than about the custom menu itself, such as the additional features in awesomebar.

Rich

Gemiddeld van beoordelings: -
In antwoord op Richard Oelmann

Re: Moodle2 Theme Settings -> Custom Menu Items Static list only?

deur Mary Evans -

Don't apologies Richard,

We are both right, you for saying that you can only work with what is available in a theme; and me was saying that it is the Administrator who actually decides what 'items' go into the menu.

To quote 'Uncle Bryn'...and say this in a Welsh accent...

"...If the truth be told, it was a very confusing question...!"

glimlag

Mary

Gemiddeld van beoordelings: -
In antwoord op Mary Evans

Re: Moodle2 Theme Settings -> Custom Menu Items Static list only?

deur Dominick Inglese -

Hello Mary Evans,

I know this thread is about 5 months old but I want to clarify the related question.

Is is possible to have menu items only for logged in members just like you can do in Drupal or Joomla?

The reason I am asking is because I want a menu item for guests that says:

"guests can not attempt quizes. You must create an account in order to attempt quizzes." 

I want to put the above quote somewhere, like the top menu (or perhaps a side block) but I want it only available for guests (those who have not created an account).

Do you have any suggestions? 

 

Sincerely,

Gemiddeld van beoordelings: -
In antwoord op Dominick Inglese

Re: Moodle2 Theme Settings -> Custom Menu Items Static list only?

deur Richard Oelmann -
Prentjie van Core developers Prentjie van Plugin developers Prentjie van Testers

Although the current custom menu can't be set for different users/roles at the moment, the old style menu used in 1.9 could - but this would have to be a hand coded menu including the php to separate it for different roles.

The side-block option you mentioned is perhaps an easier way to go as permissions can be given on blocks making them viewable by certain roles - with editing on, one of the icons on the block is 'Assign Roles'

HTH

Richard

Gemiddeld van beoordelings: -
In antwoord op Mary Evans

Re: Moodle2 Theme Settings -> Custom Menu Items Static list only?

deur Jan Low -

Hello

Please can anyone help?  We have set up our custom menu items but cannot see how to open these in a new popup window.

Any help would be appreciated.

Thank you

 

Jan

Gemiddeld van beoordelings: -
In antwoord op Jan Low

Re: Moodle2 Theme Settings -> Custom Menu Items Static list only?

deur Mary Evans -

Hi,

It is not ideal for links to open in new windows/tabs as this confuses people, as they cannot use the <<back tab in the browser as there is nothing to go back to. So the new way of thinking is that every link should open in the same window.

At the end of the day the onus is on the user anyway, as they can have the link open in the current window or in a new window.

As for the custommenu, there is no means of changing the way the links work. In the earlier version you could but not in the new version.

HTH

Mary

Gemiddeld van beoordelings: -
In antwoord op Mary Evans

Re: Moodle2 Theme Settings -> Custom Menu Items Static list only?

deur Jan Low -

Thank you for this - always hoping a solution might appear somedayglimlag

Gemiddeld van beoordelings: -