Template:NavSpecies: Difference between revisions
From Portals of Phereon Wiki
Content added Content deleted
portalsofphereon>Olaroll No edit summary |
m (add possibility of adding a class to a tabler) |
||
(44 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly><templatestyles src="NavSpecies/NavSpecies.css" /> |
|||
<onlyinclude> |
|||
{{#if:{{{16|}}}|<span class="error">[[Template:NavSpecies]]: Too many tabs; maximum is 15.</span>[[Category:Template errors]]| |
|||
⚫ | |||
⚫ | |||
{{#if:{{{1|}}}|Template:NavSpecies/{{uc:{{#sub:{{{1|}}}|0|1}}}}{{#sub:{{{1|}}}|1}}{{!}}{{uc:{{#sub:{{{1|}}}|0|1}}}}{{#sub:{{{1|}}}|1}}}} |
|||
<div class="tabber-NavSpecies {{#if:{{#replace:{{{class|}}}| |}}|tabber-{{#replace:{{{class|}}}| |}}|}}" data-open-tab="{{{open|1}}}"> |
|||
⚫ | |||
{{#while: |
|||
| {{{{{#var:i}}|}}} |
|||
| {{ucfirst:{{{{{#var:i}}|}}}}}={{NavSpecies/{{ucfirst:{{{{{#var:i}}|}}}}}}}{{!}}-{{!}} |
|||
{{#vardefine:i|{{#expr:{{#var:i}}+1}}}} |
|||
}} |
|||
⚫ | |||
</div> |
|||
}} |
}} |
||
</includeonly><!-- |
|||
⚫ | |||
IMPORTANT NOTE: There is a zero width space (there is one here ><) before each = sign. This is to prevent an issue with tabber when the tab name and a link in said tab have the same name. |
|||
{{#if:{{{1|}}}|Template:NavSpecies/{{uc:{{#sub:{{{1|}}}|0|1}}}}{{#sub:{{{1|}}}|1}}|{{uc:{{#sub:{{{1|}}}|0|1}}}}{{#sub:{{{1|}}}|1}}}} |
|||
⚫ | |||
{{#if:{{{2|}}}|Template:NavSpecies/{{uc:{{#sub:{{{2|}}}|0|1}}}}{{#sub:{{{2|}}}|1}}|{{uc:{{#sub:{{{2|}}}|0|1}}}}{{#sub:{{{2|}}}|1}}}} |
|||
{{#if:{{{3|}}}|Template:NavSpecies/{{uc:{{#sub:{{{3|}}}|0|1}}}}{{#sub:{{{3|}}}|1}}|{{uc:{{#sub:{{{3|}}}|0|1}}}}{{#sub:{{{3|}}}|1}}}} |
|||
{{#if:{{{4|}}}|Template:NavSpecies/{{uc:{{#sub:{{{4|}}}|0|1}}}}{{#sub:{{{4|}}}|1}}|{{uc:{{#sub:{{{4|}}}|0|1}}}}{{#sub:{{{4|}}}|1}}}} |
|||
{{#if:{{{5|}}}|Template:NavSpecies/{{uc:{{#sub:{{{5|}}}|0|1}}}}{{#sub:{{{5|}}}|1}}|{{uc:{{#sub:{{{5|}}}|0|1}}}}{{#sub:{{{5|}}}|1}}}} |
|||
{{#if:{{{6|}}}|Template:NavSpecies/{{uc:{{#sub:{{{6|}}}|0|1}}}}{{#sub:{{{6|}}}|1}}|{{uc:{{#sub:{{{6|}}}|0|1}}}}{{#sub:{{{6|}}}|1}}}} |
|||
{{#if:{{{7|}}}|Template:NavSpecies/{{uc:{{#sub:{{{7|}}}|0|1}}}}{{#sub:{{{7|}}}|1}}|{{uc:{{#sub:{{{7|}}}|0|1}}}}{{#sub:{{{7|}}}|1}}}} |
|||
{{#if:{{{8|}}}|Template:NavSpecies/{{uc:{{#sub:{{{8|}}}|0|1}}}}{{#sub:{{{8|}}}|1}}|{{uc:{{#sub:{{{8|}}}|0|1}}}}{{#sub:{{{8|}}}|1}}}} |
|||
{{#if:{{{9|}}}|Template:NavSpecies/{{uc:{{#sub:{{{9|}}}|0|1}}}}{{#sub:{{{9|}}}|1}}|{{uc:{{#sub:{{{9|}}}|0|1}}}}{{#sub:{{{9|}}}|1}}}} |
|||
{{#if:{{{10|}}}|Template:NavSpecies/{{uc:{{#sub:{{{10|}}}|0|1}}}}{{#sub:{{{10|}}}|1}}|{{uc:{{#sub:{{{10|}}}|0|1}}}}{{#sub:{{{10|}}}|1}}}} |
|||
{{#if:{{{11|}}}|Template:NavSpecies/{{uc:{{#sub:{{{11|}}}|0|1}}}}{{#sub:{{{11|}}}|1}}|{{uc:{{#sub:{{{11|}}}|0|1}}}}{{#sub:{{{11|}}}|1}} |
|||
⚫ | |||
| |
|||
{{Template:NavSpecies/{{uc:{{#sub:{{{1|}}}|0|1}}}}{{#sub:{{{1|}}}|1}}|{{uc:{{#sub:{{{1|}}}|0|1}}}}{{#sub:{{{1|}}}|1}}}} |
|||
}} --> |
|||
</onlyinclude> |
|||
⚫ |
Latest revision as of 01:27, 25 July 2022
- Description
- Creates a species visual navbox with up to 15 tabs based on given parameters.
- Info
- All valid tabs can be found here
- The first letter of parameters will always get capitalized
- The optional open=# parameter can be used to specify which tab is open by default
- The optional class= parameter can be used to add class to the tabler. currently available: wide
- See also Template:NavSpeciesBasic
- Tab color styles are done in Template:NavSpecies/NavSpecies.css
- Example
{{NavSpecies|open=3|shadow|Harpy|mermaid|Beast}}
Will result in this:
[view | edit | purge]The above documentation is transcluded fromTemplate:NavSpecies/doc.