Difference between revisions of "Template:Fish Header"

From Nookipedia, the Animal Crossing wiki
(Template should now display correctly on Bitterling & Coelacanth pages. Added documentation template.)
(Correcting issue where image would not generate properly on Bitterling or Coelacanth page.)
Line 11: Line 11:
 
|right-link      = {{#cargo_query:|tables=nh_fish|fields=name|where=nh_fish.number='{{#ifeq:{{PAGENAME}}|Coelacanth|1|{{#expr:{{#var:number}}+1}}}}'|no html}}
 
|right-link      = {{#cargo_query:|tables=nh_fish|fields=name|where=nh_fish.number='{{#ifeq:{{PAGENAME}}|Coelacanth|1|{{#expr:{{#var:number}}+1}}}}'|no html}}
 
|right-text      = {{#var:rightname}} ('''{{#cargo_query:|tables=nh_fish|fields=number|where=nh_fish.name='{{#var:rightname}}'|no html}}''')
 
|right-text      = {{#var:rightname}} ('''{{#cargo_query:|tables=nh_fish|fields=number|where=nh_fish.name='{{#var:rightname}}'|no html}}''')
|left-image      = File:{{#cargo_query:|tables=nh_fish|fields=image|where=nh_fish.number='{{#expr:{{#var:number}}-1}}'|no html}}
+
|left-image      = File:{{#cargo_query:|tables=nh_fish|fields=image|where=nh_fish.number='{{#ifeq:{{PAGENAME}}|Bitterling|80|{{#expr:{{#var:number}}-1}}}}'|no html}}
 
|left-imagesize  = 40px
 
|left-imagesize  = 40px
|right-image    = File:{{#cargo_query:|tables=nh_fish|fields=image|where=nh_fish.number='{{#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}}</noinclude>
 
}}<noinclude>{{Documentation}}</noinclude>

Revision as of 14:48, October 10, 2020


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