Template:MainMenu

From WoWRosterWiKi
(Difference between revisions)
Jump to: navigation, search
Line 58: Line 58:
 
* [[CodingStandards|Coding Standards]]
 
* [[CodingStandards|Coding Standards]]
 
* [[Special:Categories|Categories]]
 
* [[Special:Categories|Categories]]
 +
* [[MYSQL_Guide|MySQL Guide]]
 
</div></onlyinclude>
 
</div></onlyinclude>
  

Revision as of 22:17, 3 August 2007

WR.net

Important note: When you edit this page, you agree to release your contribution into the public domain.
If you do not want this or can not do this because of license restrictions, please do not edit.

Template

Warning.png Other Locales: For now, this menu has to be duplicated for each language translation, which is a huge bummer
So for now, when you change this menu, change all the other translations of this menu as well


Info.png Note: If you need a sub menu, add it here using the guide below!

Main Page

This is the Main Menu for our wiki

It uses a template parameter and conditionals to display sub menus
The Roster menu is called like so

{{MainMenu|Roster}}

MainMenu is the name of this template
Roster is the first parameter

{{#ifeq:{{{1}}}|Roster|
** [[SomePage|SomePage]]
|}}

This is a conditional that determines if we are printing a sub menu

{{#ifeq:{{{1}}}|Roster|

This means if the first template parameter equals Roster, then display the sub menu

|}}

This closes the conditional

If we want a sub menu in a sub menu, then we use more parameters when calling the template

{{MainMenu|Roster|Addons}}

MainMenu is the name of this template
Roster is the first parameter
Addons is the second parameter

{{#ifeq:{{{1}}}|Roster|
** [[SomePage|SomePage]]
{{#ifeq:{{{2}}}|Addons|
*** [[AnotherPage|AnotherPage]]
|}}
|}}
Personal tools
Namespaces
Variants
Actions
WoWRoster
Navigation
Toolbox