Difference between revisions of "Template:Sea Creature Header"

From Nookipedia, the Animal Crossing wiki
(Creating)
 
m
Line 1: Line 1:
{{#vardefine:number|{{#cargo_query:|tables=nh_sea_creature|fields=number|where=nh_sea_creature._pageTitle='<includeonly>{{#ifeq:{{PAGENAME}}|Venus' Flower Basket=Venus\' Flower Basket|{{PAGENAME}}}}</includeonly><noinclude>Sea Grapes</noinclude>'|no html}}}}
+
{{#vardefine:number|{{#cargo_query:|tables=nh_sea_creature|fields=number|where=nh_sea_creature._pageTitle='<includeonly>{{#ifeq:{{PAGENAME}}|Venus' Flower Basket|Venus\' Flower Basket|{{PAGENAME}}}}</includeonly><noinclude>Sea Grapes</noinclude>'|no html}}}}
 
{{#vardefine:leftname|{{#cargo_query:|tables=nh_sea_creature|fields=name|where=nh_sea_creature.number='{{#ifeq:{{PAGENAME}}|Seaweed|40|{{#expr:{{#var:number}}-1}}}}'|no html}}}}
 
{{#vardefine:leftname|{{#cargo_query:|tables=nh_sea_creature|fields=name|where=nh_sea_creature.number='{{#ifeq:{{PAGENAME}}|Seaweed|40|{{#expr:{{#var:number}}-1}}}}'|no html}}}}
 
{{#vardefine:rightname|{{#cargo_query:|tables=nh_sea_creature|fields=name|where=nh_sea_creature.number='{{#ifeq:{{PAGENAME}}|Venus' Flower Basket|1|{{#expr:{{#var:number}}+1}}}}'|no html}}}}
 
{{#vardefine:rightname|{{#cargo_query:|tables=nh_sea_creature|fields=name|where=nh_sea_creature.number='{{#ifeq:{{PAGENAME}}|Venus' Flower Basket|1|{{#expr:{{#var:number}}+1}}}}'|no html}}}}

Revision as of 03:46, October 13, 2020


Template documentation (view)


Notes

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

See also