Template:Evenodd

From Zelda Dungeon Wiki
Revision as of 03:01, August 28, 2012 by Locke (talk | contribs) (Created page with "<onlyinclude>{{#if: {{#var:evenodd}} | {{#switch: {{#var:evenodd}} | even = {{#vardefineecho:evenodd|odd}} | odd = {{#vardefineecho:evenodd|even}} }} | {{#vardefineecho:...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.

odd

Purpose

Each time this template is used within a given page, it toggles the variable "evenodd" between "even" and "odd", returning the resulting value. This can be used to dynamically switch between two different displays, such as rows in a list.

Usage

Simply call this template with {{Evenodd}} each time the return value should be the opposite of what it was the last time it was called.

When first called, it returns "odd", unless "even" is passed to the named parameter "init": {{Evenodd| init=even }}