Fandom

Wikia Developers Wiki

DropdownMenu

847pages on
this wiki
Add New Page
Talk9 Share

With this bit of CSS you can add your own dropdown menus to your wiki. You can use the menu either with plain wikitext or with a template.

Example

Wikitext

This wikitext will generate the example above:

<div class="custom-dropdown wikia-menu-button"><!--
--><span>Links</span><!--
--><ul class="WikiaMenuElement">
<li>[[:Category:CSS]]</li>
<li>[[Wikia_Developers_Wiki|Main Page]]</li>
<li>[[Special:WikiActivity]]</li>
</ul></div>

Note: Any whitespace outside of the list will mess up the button. That's the reason for all the comments in the first part of the example.

Template

If you'd rather use a template than raw wikitext, use Template:Dropdown. This is how to create the example above:

{{ Dropdown
| Links
| [[:Category:CSS]]
| [[Wikia_Developers_Wiki|Main Page]]
| [[Special:WikiActivity]]
}}

Usage

  1. Copypaste the CSS to your wiki's MediaWiki:Wikia.css
  2. Copypaste the example code above to the page(s) where you want to use the dropdown menu
  3. If you'd rather use the templated version than the raw wikitext, you will also have to create Template:Dropdown and Template:Dropdown/doc at your wiki and copypaste Template:Dropdown and Template:Dropdown/doc from here to there.

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.