Difference between revisions of "Template:Fish Header"

From Nookipedia, the Animal Crossing wiki
(nvm)
m (Text replacement - "Category:Header Templates" to "Category:Header templates")
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{#vardefine:number|{{#cargo_query:|tables=nh_fish|fields=number|where=nh_fish._pageTitle='<includeonly>{{PAGENAME}}</includeonly><noinclude>Pale Chub</noinclude>'|no html}}}}
+
{{#vardefine:number|{{#cargo_query:|tables=nh_fish|fields=number|where=nh_fish._pageTitle='<includeonly>{{PAGENAME}}</includeonly><noinclude>Pale Chub</noinclude>'|no html}}}}{{#vardefine:leftname|{{#cargo_query:|tables=nh_fish|fields=name|where=nh_fish.number='{{#ifeq:{{PAGENAME}}|Bitterling|80|{{#expr:{{#var:number}}-1}}}}'|no html}}}}{{#vardefine:rightname|{{#cargo_query:|tables=nh_fish|fields=name|where=nh_fish.number='{{#ifeq:{{PAGENAME}}|Coelacanth|1|{{#expr:{{#var:number}}+1}}}}'|no html}}}}
{{#vardefine:leftname|{{#cargo_query:|tables=nh_fish|fields=name|where=nh_fish.number='{{#ifeq:{{PAGENAME}}|Bitterling|80|{{#expr:{{#var:number}}-1}}}}'|no html}}}}
 
{{#vardefine:rightname|{{#cargo_query:|tables=nh_fish|fields=name|where=nh_fish.number='{{#ifeq:{{PAGENAME}}|Coelacanth|1|{{#expr:{{#var:number}}+1}}}}'|no html}}}}
 
 
{{Header Box
 
{{Header Box
 
|bg-color        = #B3E5FF
 
|bg-color        = #B3E5FF
Line 15: Line 13:
 
|right-image    = File:{{#cargo_query:|tables=nh_fish|fields=image|where=nh_fish.number='{{#ifeq:{{PAGENAME}}|Coelacanth|1|{{#expr:{{#var:number}}+1}}}}'|no html}}
 
|right-image    = File:{{#cargo_query:|tables=nh_fish|fields=image|where=nh_fish.number='{{#ifeq:{{PAGENAME}}|Coelacanth|1|{{#expr:{{#var:number}}+1}}}}'|no html}}
 
|right-imagesize = 40px
 
|right-imagesize = 40px
}}<noinclude>{{Documentation}} [[Category:Header Templates]]</noinclude>
+
}}<noinclude>{{Documentation}} [[Category:Header templates]]</noinclude>

Revision as of 20:04, March 22, 2021

Template documentation (view)


Notes

This template is for use only on New Horizons fish pages and will not function properly elsewhere. It automatically generates the previous and last fish in the series based on that fish's internal number, as sourced from its Cargo data. It uses {{PAGENAME}} as input, so the fish's name as stored in Cargo must exactly match its article name for proper functionality.

See also