Template:Set-annual-property/doc

From SABR Encyclopedia

(Difference between revisions)
Jump to: navigation, search
(Created page with 'This template automates the setting of "annual" properties. These are properties where the first part of the value of the property is a year; for example, <nowiki>[[person-presi...')
 
Line 8: Line 8:
Since there is no real looping capability in MediaWiki, this template manually goes through all the years from 1871 to 2009 and checks whether the year is in the range specified.
Since there is no real looping capability in MediaWiki, this template manually goes through all the years from 1871 to 2009 and checks whether the year is in the range specified.
-
 
-
Due to a glitch in the way template previewing is done, errors show up in red in the preview. These can be safely ignored.
 

Latest revision as of 20:04, 12 April 2009

This template automates the setting of "annual" properties. These are properties where the first part of the value of the property is a year; for example, [[person-president-league::1901 American League]]

This template takes four parameters:

  • property= The property to set
  • value= The value to use for the property, which follows the year
  • startyear= The first year to set the property
  • endyear= The last year to set the property

Since there is no real looping capability in MediaWiki, this template manually goes through all the years from 1871 to 2009 and checks whether the year is in the range specified.

Personal tools