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

Template:Newsarchive

From the Assassin's Creed Wiki
Jump to navigation Jump to search


Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit Template:Newsarchive/doc to edit this documentation. (How does this work?)

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.