Template:MainMenu

From WoWRosterWiKi
(Difference between revisions)
Jump to: navigation, search
Line 16: Line 16:
 
** [[Roster:ChangeLog|Change Log]]
 
** [[Roster:ChangeLog|Change Log]]
 
** [[Roster:RoadMap|Road Map]]
 
** [[Roster:RoadMap|Road Map]]
** [[Roster:Install|Installing Roster]]
+
** [[Roster:Install|Install]]
 
** [[Roster:FirstUpload|First Upload]]
 
** [[Roster:FirstUpload|First Upload]]
 
** [[Roster:CP|Control Panel]]
 
** [[Roster:CP|Control Panel]]
** [[Roster:RosterDiag|Roster Diagnostics]]
+
** [[Roster:RosterDiag|Diagnostics]]
** [[Roster:Menu|Roster Main Menu]]
+
** [[Roster:Menu|Main Menu]]
** [[Roster:Updating|Updating Guild and Character Data]]
+
** [[Roster:Updating|Updating Guild / Character Data]]
** [[Roster:Addon|Roster Addons]] ([[AddonSDK|AddOn SDK]])
+
** [[Roster:Addon|Addons]] ([[AddonSDK|AddOn SDK]])
 
** [[Roster:FunctionsOverview|Functions Overview]]
 
** [[Roster:FunctionsOverview|Functions Overview]]
** [[Roster:Port|Roster CMS Integration]]
+
** [[Roster:Port|CMS Integration]]
 
{{#ifeq: {{{2}}}|Port|
 
{{#ifeq: {{{2}}}|Port|
 
*** [[Roster:Port:WoWRosterDF|WoWRosterDF]]
 
*** [[Roster:Port:WoWRosterDF|WoWRosterDF]]
Line 39: Line 39:
 
** [[UniAdmin:Help|Help]]
 
** [[UniAdmin:Help|Help]]
 
|}}
 
|}}
* [[WoWAddon]]s
+
* [[WoWAddon|WoW Game Addons]]
 
{{#ifeq:{{{1}}}|WoWAddon|
 
{{#ifeq:{{{1}}}|WoWAddon|
 
** [[WoWRosterProfiler]]
 
** [[WoWRosterProfiler]]
Line 57: Line 57:
 
* [[MYSQL_Guide|MySQL Guide]]|
 
* [[MYSQL_Guide|MySQL Guide]]|
 
<!--  BEGIN OTHER LOCALE MENU -->
 
<!--  BEGIN OTHER LOCALE MENU -->
* {{#ifexist: Roster/{{SUBPAGENAME}}|[[Roster/{{SUBPAGENAME}}|Roster]]|[[Roster|Roster]]}}
 
 
* {{MainMenuL|Roster|Roster}}
 
* {{MainMenuL|Roster|Roster}}
 
{{#ifeq:{{{1}}}|Roster|
 
{{#ifeq:{{{1}}}|Roster|
** {{#ifexist: Roster:Requirements/{{SUBPAGENAME}}|[[Roster:Requirements/{{SUBPAGENAME}}|Requirements]]|[[Roster:Requirements|Requirements]]}}
+
** {{MainMenuL|Roster:Requirements|Requirements}}
** {{#ifexist: Roster:ChangeLog/{{SUBPAGENAME}}|[[Roster:ChangeLog/{{SUBPAGENAME}}|Change Log]]|[[Roster:ChangeLog|Change Log]]}}
+
** [[Roster:ChangeLog|Change Log]]
** {{#ifexist: Roster:RoadMap/{{SUBPAGENAME}}|[[Roster:RoadMap/{{SUBPAGENAME}}|Road Map]]|[[Roster:RoadMap|Road Map]]}}
+
** {{MainMenuL|Roster:RoadMap|Road Map}}
** {{#ifexist: Roster:Install/{{SUBPAGENAME}}|[[Roster:Install/{{SUBPAGENAME}}|Installing Roster]]|[[Roster:Install|Installing Roster]]}}
+
** {{MainMenuL|Roster:Install|Install}}
** {{#ifexist: Roster:FirstUpload/{{SUBPAGENAME}}|[[Roster:FirstUpload/{{SUBPAGENAME}}|First Upload]]|[[Roster:FirstUpload|First Upload]]}}
+
** {{MainMenuL|Roster:FirstUpload|First Upload}}
** {{#ifexist: Roster:CP/{{SUBPAGENAME}}|[[Roster:CP/{{SUBPAGENAME}}|Control Panel]]|[[Roster:CP|Control Panel]]}}
+
** {{MainMenuL|Roster:CP|Control Panel}}
** {{#ifexist: Roster:RosterDiag/{{SUBPAGENAME}}|[[Roster:RosterDiag/{{SUBPAGENAME}}|Roster Diagnosics]]|[[Roster:RosterDiag|Roster Diagnostics]]}}
+
** {{MainMenuL|Roster:RosterDiag|Diagnostics}}
** {{#ifexist: Roster:Menu/{{SUBPAGENAME}}|[[Roster:Menu/{{SUBPAGENAME}}|Roster Main Menu]]|[[Roster:Menu|Roster Main Menu]]}}
+
** {{MainMenuL|Roster:Menu|Main Menu}}
** {{#ifexist: Roster:Updating/{{SUBPAGENAME}}|[[Roster:Updating/{{SUBPAGENAME}}|Updating Guild and Character Data]]|[[Roster:Updating|Updating Character and Guild Data to Roster]]}}
+
** {{MainMenuL|Roster:Updating|Updating Guild / Character Data}}
** {{#ifexist: Roster:Addon/{{SUBPAGENAME}}|[[Roster:Addon/{{SUBPAGENAME}}|Roster Addons]]|[[Roster:Addon|Roster Addons]]}} ([[AddonSDK|AddOn SDK]])
+
** {{MainMenuL|Roster:Addon|Addons}} ([[AddonSDK|AddOn SDK]])
** {{#ifexist: Roster:FunctionsOverview/{{SUBPAGENAME}}|[[Roster:FunctionsOverview/{{SUBPAGENAME}}|Functions Overview]]|[[Roster:FunctionsOverview|Functions Overview]]}}
+
** [[Roster:FunctionsOverview|Functions Overview]]
** {{#ifexist: Roster:Port/{{SUBPAGENAME}}|[[Roster:Port/{{SUBPAGENAME}}|Roster CMS Integration]]|[[Roster:Port|Roster CMS Integration]]}}
+
** {{MainMenuL|Roster:Port|CMS Integration}}
 
{{#ifeq: {{{2}}}|Port|
 
{{#ifeq: {{{2}}}|Port|
*** {{#ifexist: Roster:Port:WoWRosterDF/{{SUBPAGENAME}}|[[Roster:Port:WoWRosterDF/{{SUBPAGENAME}}|WoWRosterDF]]|[[Roster:Port:WoWRosterDF|WoWRosterDF]]}}
+
*** {{MainMenuL|Roster:Port:WoWRosterDF|WoWRosterDF}}
 
|}}
 
|}}
 
|}}
 
|}}
* {{#ifexist: UniUploader/{{SUBPAGENAME}}|[[UniUploader/{{SUBPAGENAME}}|UniUploader]]|[[UniUploader|UniUploader]]}}
+
* {{MainMenuL|UniUploader}}
 
{{#ifeq:{{{1}}}|UniUploader|
 
{{#ifeq:{{{1}}}|UniUploader|
** {{#ifexist: UniUploader:BasicSetup/{{SUBPAGENAME}}|[[UniUploader:BasicSetup/{{SUBPAGENAME}}|Basic Setup]]|[[UniUploader:BasicSetup|Basic Setup]]}}
+
** {{MainMenuL|UniUploader:BasicSetup|Basic Setup}}
** {{#ifexist: UniUploader:Advanced/{{SUBPAGENAME}}|[[UniUploader:Advanced/{{SUBPAGENAME}}|Advanced Techniques]]|[[UniUploader:Advanced|Advanced Techniques]]}}
+
** {{MainMenuL|UniUploader:Advanced|Advanced Techniques}}
** {{#ifexist: UniUploader:Distribution/{{SUBPAGENAME}}|[[UniUploader:Distribution/{{SUBPAGENAME}}|Distribution]]|[[UniUploader:Distribution|Distribution]]}}
+
** {{MainMenuL|UniUploader:Distribution|Distribution}}
 
|}}
 
|}}
* {{#ifexist: UniAdmin/{{SUBPAGENAME}}|[[UniAdmin/{{SUBPAGENAME}}|UniAdmin]]|[[UniAdmin|UniAdmin]]}}
+
* {{MainMenuL|UniAdmin}}
 
{{#ifeq:{{{1}}}|UniAdmin|
 
{{#ifeq:{{{1}}}|UniAdmin|
** {{#ifexist: UniAdmin:Help/{{SUBPAGENAME}}|[[UniAdmin:Help/{{SUBPAGENAME}}|Help]]|[[UniAdmin:Help|Help]]}}
+
** {{MainMenuL|UniAdmin:Help|Help}}
 
|}}
 
|}}
* {{#ifexist: WoWAddon/{{SUBPAGENAME}}|[[WoWAddon/{{SUBPAGENAME}}|WoWAddons]]|[[WoWAddon|WoWAddons]]}}
+
* {{MainMenuL|WoWAddon|WoW Game Addons}}
 
{{#ifeq:{{{1}}}|WoWAddon|
 
{{#ifeq:{{{1}}}|WoWAddon|
** {{#ifexist: WoWRosterProfiler/{{SUBPAGENAME}}|[[WoWRosterProfiler/{{SUBPAGENAME}}|WoWRosterProfiler]]|[[WoWRosterProfiler]]}}
+
** {{MainMenuL|WoWRosterProfiler}}
** {{#ifexist: WoWRoster-GP/{{SUBPAGENAME}}|[[WoWRoster-GP/{{SUBPAGENAME}}|WoWRoster-GP]]|[[WoWRoster-GP]]}}
+
** {{MainMenuL|WoWRoster-GP}}
** {{#ifexist: PvPLog/{{SUBPAGENAME}}|[[PvPLog/{{SUBPAGENAME}}|PvPLog]]|[[PvPLog]]}}
+
** {{MainMenuL|PvPLog}}
 
{{#ifeq: {{{2}}}|PvPLog|
 
{{#ifeq: {{{2}}}|PvPLog|
*** {{#ifexist: PvPLog:Changes/{{SUBPAGENAME}}|[[PvPLog:Changes/{{SUBPAGENAME}}|Change Log]]|[[PvPLog:Changes|Change Log]]}}
+
*** [[PvPLog:Changes|Change Log]]
*** {{#ifexist: PvPLog:TODO/{{SUBPAGENAME}}|[[PvPLog:TODO/{{SUBPAGENAME}}|TODO]]|[[PvPLog:TODO|TODO]]}}
+
*** [[PvPLog:TODO|TODO]]
 
|}}
 
|}}
 
|}}
 
|}}
* {{#ifexist: SVN/{{SUBPAGENAME}}|[[SVN/{{SUBPAGENAME}}]]|[[SVN|Google Code SVN]]}}
+
* {{MainMenuL|SVN|Google Code SVN}}
 
{{#ifeq:{{{1}}}|SVN|
 
{{#ifeq:{{{1}}}|SVN|
** {{#ifexist: SVN:Rules/{{SUBPAGENAME}}|[[SVN:Rules/{{SUBPAGENAME}}|Rules]]|[[SVN:Rules|Rules]]}}
+
** {{MainMenuL|SVN:Rules|Rules}}
** {{#ifexist: SVN:Repositories/{{SUBPAGENAME}}|[[SVN:Repositories/{{SUBPAGENAME}}|Repositories]]|[[SVN:Repositories|Repositories]]}}
+
** {{MainMenuL|SVN:Repositories|Repositories}}
** {{#ifexist: SVN:TortoiseSVN/{{SUBPAGENAME}}|[[SVN:TortoiseSVN/{{SUBPAGENAME}}|TortoiseSVN Help]]|[[SVN:TortoiseSVN|TortoiseSVN Help]]}}
+
** {{MainMenuL|SVN:TortoiseSVN|TortoiseSVN Help}}
 
|}}
 
|}}
* {{#ifexist: MYSQL_Guide/{{SUBPAGENAME}}|[[MYSQL_Guide/{{SUBPAGENAME}}|MySQL Guide]]|[[MYSQL_Guide|MySQL Guide]]}}
+
* {{MainMenuL|MYSQL_Guide|MySQL Guide}}
}}
+
 
* [http://www.wowroster.net/the-team.html The WR.net Team]
 
* [http://www.wowroster.net/the-team.html The WR.net Team]
 
* [[CodingStandards|Coding Standards]]
 
* [[CodingStandards|Coding Standards]]

Revision as of 02:26, 10 January 2011

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

{{#ifeq:MainMenu|MainMenu|

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