Welcome to Assassin's Creed Wiki! Log in and join the community.

Template:Newsarchive/doc: Difference between revisions

From the Assassin's Creed Wiki
Jump to navigation Jump to search
imported>D. Cello
Created page with ' Template which produces a small box with links to news archive categories up to 5 years back from a given year. If no year is given, it starts with the current. Uses {{tl|newsa…'
 
imported>D. Cello
No edit summary
 
Line 1: Line 1:
Template which produces a small box with links to news archive categories up to 5 years back from a given year. If no year is given, it starts with the current.
Template which produces a small box with links to news archive categories up to 5 years back from a given year. If no year is given, it starts with the current.


Uses {{tl|newsarchive/aux}}.
Uses <nowiki>{{</nowiki>[[Template:newsarchive/aux|newsarchive/aux]]<nowiki>}}</nowiki>.


==Usage==
==Usage==

Latest revision as of 06:33, 14 April 2010

Template which produces a small box with links to news archive categories up to 5 years back from a given year. If no year is given, it starts with the current.

Uses {{newsarchive/aux}}.

Usage[edit source]

{{newsarchive|newsstartyear=2009}}

Parameters[edit source]

newsstartyear (required)

The year in which the news posts started (generally). This is to avoid redundant checks for years in which no news posts exist.

<unnamed 1> (optional)

Year to start from (i.e. the latest year which should be displayed).

Technical[edit source]

This template uses the parser function #ifexist: which is considered an "expensive parser function", only a limited number of which can be included on any one page (including functions inside transcluded templates). When this limit is exceeded, any further #ifexist: functions automatically return false, whether the target page exists or not.

As such, this template should not be expanded to check for more than 6 years. 99 is the default value for expensive parser functions per page; this template uses up to 13 ifexist calls per year, making 7 the theoretical maximum of years. A little "buffer" should be given, hence 6 years maximum.