Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:TournamentTabs: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
Auto-detecting navigation tabs. Tabs appear only if the subpage exists.
Navigation tabs for tournament pages. Auto-detects subpages without needing the Variables extension.
Usage: {{TournamentTabs}}
Usage: {{TournamentTabs}}
</noinclude><includeonly>
</noinclude><includeonly>
<div class="tournament-tabs" style="display:flex; flex-wrap:wrap; gap:4px; border-bottom:2px solid var(--primary-color, #007bff); margin-bottom:20px;">
<div class="tournament-tabs" style="display:flex; flex-wrap:wrap; gap:4px; border-bottom:2px solid var(--primary-color, #007bff); margin-bottom:20px;">


{{#vars:basePage|{{#switch:{{SUBPAGENAME}}
  <div style="padding:10px 20px; font-weight:bold; cursor:pointer;
|Standings|Statistics|Teams|Matches|Qualifiers={{#titleparts:{{PAGENAME}}|-1}}
      background-color:{{#ifeq:{{SUBPAGENAME}}|Standings|#fff|{{#ifeq:{{SUBPAGENAME}}|Statistics|#fff|{{#ifeq:{{SUBPAGENAME}}|Teams|#fff|{{#ifeq:{{SUBPAGENAME}}|Matches|#fff|#eee}}}}}}}};
|#default={{PAGENAME}}
      border-bottom:{{#ifeq:{{SUBPAGENAME}}|Standings|none|{{#ifeq:{{SUBPAGENAME}}|Statistics|none|{{#ifeq:{{SUBPAGENAME}}|Teams|none|{{#ifeq:{{SUBPAGENAME}}|Matches|none|3px solid var(--primary-color, #007bff)}}}}}}}};">
}}}}
      [[{{#switch:{{SUBPAGENAME}}
        |Standings|Statistics|Teams|Matches={{#titleparts:{{PAGENAME}}|-1}}
        |#default={{PAGENAME}}
      }}|<span style="color:var(--text-main, #333);">Overview</span>]]
  </div>


<div style="padding:10px 20px; font-weight:bold; cursor:pointer;  
  {{#ifexist: {{#switch:{{SUBPAGENAME}}
background-color:{{#ifeq:{{PAGENAME}}|{{#var:basePage}}|#eee|#fff}};  
        |Standings|Statistics|Teams|Matches={{#titleparts:{{PAGENAME}}|-1}}
border-bottom:{{#ifeq:{{PAGENAME}}|{{#var:basePage}}|3px solid var(--primary-color, #007bff)|none}};">
        |#default={{PAGENAME}}
[[{{#var:basePage}}|<span style="color:var(--text-main, #333);">Overview</span>]]
      }}/Standings |
</div>
  <div style="padding:10px 20px; font-weight:bold; cursor:pointer;  
      background-color:{{#ifeq:{{SUBPAGENAME}}|Standings|#eee|#fff}};  
      border-bottom:{{#ifeq:{{SUBPAGENAME}}|Standings|3px solid var(--primary-color, #007bff)|none}};">
      [[{{#switch:{{SUBPAGENAME}}
        |Standings|Statistics|Teams|Matches={{#titleparts:{{PAGENAME}}|-1}}
        |#default={{PAGENAME}}
      }}/Standings|<span style="color:var(--text-main, #333);">Standings</span>]]
  </div>
  }}


{{#ifexist: {{#var:basePage}}/Standings |
  {{#ifexist: {{#switch:{{SUBPAGENAME}}
<div style="padding:10px 20px; font-weight:bold; cursor:pointer;  
        |Standings|Statistics|Teams|Matches={{#titleparts:{{PAGENAME}}|-1}}
background-color:{{#ifeq:{{SUBPAGENAME}}|Standings|#eee|#fff}};  
        |#default={{PAGENAME}}
border-bottom:{{#ifeq:{{SUBPAGENAME}}|Standings|3px solid var(--primary-color, #007bff)|none}};">
      }}/Statistics |
[[{{#var:basePage}}/Standings|<span style="color:var(--text-main, #333);">Standings</span>]]
  <div style="padding:10px 20px; font-weight:bold; cursor:pointer;  
</div>
      background-color:{{#ifeq:{{SUBPAGENAME}}|Statistics|#eee|#fff}};  
}}
      border-bottom:{{#ifeq:{{SUBPAGENAME}}|Statistics|3px solid var(--primary-color, #007bff)|none}};">
      [[{{#switch:{{SUBPAGENAME}}
        |Standings|Statistics|Teams|Matches={{#titleparts:{{PAGENAME}}|-1}}
        |#default={{PAGENAME}}
      }}/Statistics|<span style="color:var(--text-main, #333);">Statistics</span>]]
  </div>
  }}


{{#ifexist: {{#var:basePage}}/Statistics |
  {{#ifexist: {{#switch:{{SUBPAGENAME}}
<div style="padding:10px 20px; font-weight:bold; cursor:pointer;  
        |Standings|Statistics|Teams|Matches={{#titleparts:{{PAGENAME}}|-1}}
background-color:{{#ifeq:{{SUBPAGENAME}}|Statistics|#eee|#fff}};  
        |#default={{PAGENAME}}
border-bottom:{{#ifeq:{{SUBPAGENAME}}|Statistics|3px solid var(--primary-color, #007bff)|none}};">
      }}/Teams |
[[{{#var:basePage}}/Statistics|<span style="color:var(--text-main, #333);">Statistics</span>]]
  <div style="padding:10px 20px; font-weight:bold; cursor:pointer;  
</div>
      background-color:{{#ifeq:{{SUBPAGENAME}}|Teams|#eee|#fff}};  
}}
      border-bottom:{{#ifeq:{{SUBPAGENAME}}|Teams|3px solid var(--primary-color, #007bff)|none}};">
      [[{{#switch:{{SUBPAGENAME}}
        |Standings|Statistics|Teams|Matches={{#titleparts:{{PAGENAME}}|-1}}
        |#default={{PAGENAME}}
      }}/Teams|<span style="color:var(--text-main, #333);">Teams</span>]]
  </div>
  }}


{{#ifexist: {{#var:basePage}}/Teams |
  {{#ifexist: {{#switch:{{SUBPAGENAME}}
<div style="padding:10px 20px; font-weight:bold; cursor:pointer;
        |Standings|Statistics|Teams|Matches={{#titleparts:{{PAGENAME}}|-1}}
background-color:{{#ifeq:{{SUBPAGENAME}}|Teams|#eee|#fff}};
        |#default={{PAGENAME}}
border-bottom:{{#ifeq:{{SUBPAGENAME}}|Teams|3px solid var(--primary-color, #007bff)|none}};">
      }}/Matches |
[[{{#var:basePage}}/Teams|<span style="color:var(--text-main, #333);">Teams</span>]]
  <div style="padding:10px 20px; font-weight:bold; cursor:pointer;  
</div>
      background-color:{{#ifeq:{{SUBPAGENAME}}|Matches|#eee|#fff}};  
}}
      border-bottom:{{#ifeq:{{SUBPAGENAME}}|Matches|3px solid var(--primary-color, #007bff)|none}};">
 
      [[{{#switch:{{SUBPAGENAME}}
{{#ifexist: {{#var:basePage}}/Matches |
        |Standings|Statistics|Teams|Matches={{#titleparts:{{PAGENAME}}|-1}}
<div style="padding:10px 20px; font-weight:bold; cursor:pointer;  
        |#default={{PAGENAME}}
background-color:{{#ifeq:{{SUBPAGENAME}}|Matches|#eee|#fff}};  
      }}/Matches|<span style="color:var(--text-main, #333);">Matches</span>]]
border-bottom:{{#ifeq:{{SUBPAGENAME}}|Matches|3px solid var(--primary-color, #007bff)|none}};">
  </div>
[[{{#var:basePage}}/Matches|<span style="color:var(--text-main, #333);">Matches</span>]]
  }}
</div>
}}


</div>
</div>
</includeonly>
</includeonly>

Revision as of 15:52, 14 January 2026

Navigation tabs for tournament pages. Auto-detects subpages without needing the Variables extension. Usage: