Difference between revisions of "Custom menu items"

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 2.2. Up-to-date documentation for the latest stable version is available here: Custom menu items.

(Created page with "{{Navigation}} <p class="note">'''Please refer to these notes before editing this page.'''</p>")
 
(Documented multilanguage support as promised in MDL-27073)
Line 1: Line 1:
 
{{Navigation}}
 
{{Navigation}}
 
<p class="note">'''Please refer to [[TOC_with_notes#Navigation|these notes]] before editing this page.'''</p>
 
<p class="note">'''Please refer to [[TOC_with_notes#Navigation|these notes]] before editing this page.'''</p>
 +
 +
You can configure a custom menu 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. For example:
 +
 +
<pre><nowiki>
 +
Moodle community|http://moodle.org
 +
-Moodle free support|http://moodle.org/support
 +
-Moodle development|http://moodle.org/development
 +
--Moodle Tracker|http://tracker.moodle.org
 +
--Moodle Docs|https://docs.moodle.org
 +
-Moodle News|http://moodle.org/news
 +
Moodle company
 +
-Moodle commercial hosting|http://moodle.com/hosting
 +
-Moodle commercial support|http://moodle.com/support
 +
</nowiki></pre>
 +
 +
=== Multilanguage support ===
 +
{{Moodle 2.1}}
 +
 +
Since Moodle 2.1, you can add a language code (or a comma separated list of codes) as the 4th item of the line. The line will be then printed if and only if the user has currently selected the listed language. For example:
 +
 +
<pre><nowiki>
 +
English only|http://moodle.com|English only item|en
 +
German only|http://moodle.de|Deutsch|de,de_du,de_kids
 +
</nowiki></pre>

Revision as of 09:31, 20 September 2011

Template:Navigation

Please refer to these notes before editing this page.

You can configure a custom menu 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. For example:

 Moodle community|http://moodle.org
 -Moodle free support|http://moodle.org/support
 -Moodle development|http://moodle.org/development
 --Moodle Tracker|http://tracker.moodle.org
 --Moodle Docs|https://docs.moodle.org
 -Moodle News|http://moodle.org/news
 Moodle company
 -Moodle commercial hosting|http://moodle.com/hosting
 -Moodle commercial support|http://moodle.com/support

Multilanguage support

Template:Moodle 2.1

Since Moodle 2.1, you can add a language code (or a comma separated list of codes) as the 4th item of the line. The line will be then printed if and only if the user has currently selected the listed language. For example:

 English only|http://moodle.com|English only item|en
 German only|http://moodle.de|Deutsch|de,de_du,de_kids