Template:MainMenu

From WoWRosterWiKi
(Difference between revisions)
Jump to: navigation, search
Line 21: Line 21:
 
** [[Roster:FirstUpload|First Upload]]
 
** [[Roster:FirstUpload|First Upload]]
 
** [[Roster:CP|Control Panel]]
 
** [[Roster:CP|Control Panel]]
** [[Roster:RosterDiag|Roster Diagnosics]]
+
** [[Roster:RosterDiag|Roster Diagnostics]]
 
** [[Roster:Menu|Roster Main Menu]]
 
** [[Roster:Menu|Roster Main Menu]]
** [[Roster:Updating|Updating Character and Guild Data to Roster]]
+
** [[Roster:Updating|Updating Guild and Character Data]]
 
** [[Roster:Addon|Roster Addons]] ([[AddonSDK|AddOn SDK]])
 
** [[Roster:Addon|Roster Addons]] ([[AddonSDK|AddOn SDK]])
 
** [[Roster:FunctionsOverview|Functions Overview]]
 
** [[Roster:FunctionsOverview|Functions Overview]]
Line 72: Line 72:
 
** {{#ifexist: Roster:FirstUpload/{{SUBPAGENAME}}|[[Roster:FirstUpload/{{SUBPAGENAME}}|First Upload]]|[[Roster:FirstUpload|First Upload]]}}
 
** {{#ifexist: Roster:FirstUpload/{{SUBPAGENAME}}|[[Roster:FirstUpload/{{SUBPAGENAME}}|First Upload]]|[[Roster:FirstUpload|First Upload]]}}
 
** {{#ifexist: Roster:CP/{{SUBPAGENAME}}|[[Roster:CP/{{SUBPAGENAME}}|Control Panel]]|[[Roster:CP|Control Panel]]}}
 
** {{#ifexist: Roster:CP/{{SUBPAGENAME}}|[[Roster:CP/{{SUBPAGENAME}}|Control Panel]]|[[Roster:CP|Control Panel]]}}
** {{#ifexist: Roster:RosterDiag/{{SUBPAGENAME}}|[[Roster:RosterDiag/{{SUBPAGENAME}}|Roster Diagnosics]]|[[Roster:RosterDiag|Roster Diagnosics]]}}
+
** {{#ifexist: Roster:RosterDiag/{{SUBPAGENAME}}|[[Roster:RosterDiag/{{SUBPAGENAME}}|Roster Diagnosics]]|[[Roster:RosterDiag|Roster Diagnostics]]}}
 
** {{#ifexist: Roster:Menu/{{SUBPAGENAME}}|[[Roster:Menu/{{SUBPAGENAME}}|Roster Main Menu]]|[[Roster:Menu|Roster Main Menu]]}}
 
** {{#ifexist: Roster:Menu/{{SUBPAGENAME}}|[[Roster:Menu/{{SUBPAGENAME}}|Roster Main Menu]]|[[Roster:Menu|Roster Main Menu]]}}
** {{#ifexist: Roster:Updating/{{SUBPAGENAME}}|[[Roster:Updating/{{SUBPAGENAME}}|Updating Character and Guild Data to Roster]]|[[Roster:Updating|Updating Character and Guild Data to Roster]]}}
+
** {{#ifexist: Roster:Updating/{{SUBPAGENAME}}|[[Roster:Updating/{{SUBPAGENAME}}|Updating Guild and Character Data]]|[[Roster:Updating|Updating Character and Guild Data to Roster]]}}
 
** {{#ifexist: Roster:Addon/{{SUBPAGENAME}}|[[Roster:Addon/{{SUBPAGENAME}}|Roster Addons]]|[[Roster:Addon|Roster Addons]]}} ([[AddonSDK|AddOn SDK]])
 
** {{#ifexist: Roster:Addon/{{SUBPAGENAME}}|[[Roster:Addon/{{SUBPAGENAME}}|Roster Addons]]|[[Roster:Addon|Roster Addons]]}} ([[AddonSDK|AddOn SDK]])
 
** {{#ifexist: Roster:FunctionsOverview/{{SUBPAGENAME}}|[[Roster:FunctionsOverview/{{SUBPAGENAME}}|Functions Overview]]|[[Roster:FunctionsOverview|Functions Overview]]}}
 
** {{#ifexist: Roster:FunctionsOverview/{{SUBPAGENAME}}|[[Roster:FunctionsOverview/{{SUBPAGENAME}}|Functions Overview]]|[[Roster:FunctionsOverview|Functions Overview]]}}

Revision as of 19:16, 31 March 2008

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 made for English, then duplicated once for other languages, which is a huge bummer
So for now, when you change this menu, make sure you scroll down and change the duplicate


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

Main Page

Syntax

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]]
|}}
|}}

The Other Locale Duplicate

To make the menu keep linking to the same language, we copy the menu once and add "/{{SUBPAGENAME}}" to the link
This will make the menu link to the pages in the menu, keeping the same locale
If the page does not exist for that locale, then it should link to the English version

The syntax for this is quite complex as we detect if the translated page exists

Each link needs to look like this:

{{#ifexist: PageName/{{SUBPAGENAME}}|[[PageName/{{SUBPAGENAME}}|Page Name Text]]|[[PageName|Page Name Text]]}}

Some links need to stay linked to the English version, such as the Coding Standards, The Team, and the AddOn SDK
These page may be changed on every release version of our software or even between versions

Personal tools
Namespaces
Variants
Actions
WoWRoster
Navigation
Toolbox