Fandom

Wikia Developers Wiki

ExtendedNavigation

889pages on
this wiki
Add New Page
Talk53 Share

ExtendedNavigation allows your wiki to take advantage of 4th and 5th level navigation on the standard NavBar.

Installation

See also: Help:JavaScript and CSS Cheatsheet, Help:Including additional JavaScript and CSS
dev:ExtendedNavigation/code.js

Usage

When adding level 4 and level 5 submenus, simply edit your MediaWiki:Wiki-navigation file as usual, and use '****' to designate level 4 submenus and '*****' to designate level 5 submenus. Wikia will ignore the extra lines, but the custom JavaScript will add the higher-level menus where appropriate.

A couple of things to note:

  • You may only increase the submenu level by 1 level at a time (just like with the normal Wikia-generated menus), i.e. you can't have a level 4 submenu immediately following a level 2 submenu.
  • If you wish to add a level 4 submenu, the level 2 submenu it belongs to must be unique. Either the link itself must be unique, or if you have used <nowiki></nowiki> to identify a menu item with no link ('#'), the display name must be unique. The code uses a jQuery .find() method to attach the appropriate HTML, so if the level 2 submenu is not unique, it will attach the menu to every instance it finds.

Updates

[02 December 2016] OneTwoThreeFall: Support for full URLs (e.g. links to external sites); code clean-up and fixes.
[09 November 2016] OneTwoThreeFall: Support for navigation edit preview; various bug fixes.
[26 November 2013] Spottra: Automated color matching.
[23 November 2013] Spottra: Initial release.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.