Template:Historical/doc

From Old School RuneScape Wiki
Jump to: navigation, search
Information icon-grey.svg
This is a documentation subpage for Template:Historical.
It contains usage information, categories, and other content that is not part of the original template page.
Template:Historical invokes Module:Historical using Lua.

This template is an abstraction for more specific templates used to indicate a page is historical and should not be deleted.

Details

This template will invoke a subpage template of itself based on either context, in the event that no parameter was passed, or the name given. By default, when placed on content articles (sans-namespace), it will invoke Template:Historical/main, and on file pages, it will invoke Template:Historical/image. This is done for consistency between namespaces.

Custom templates

Custom templates can be made as subpages of this template, and can be used like {{Historical|[template name]}}. The subpage name must be all lowercase, as the module will downcase the parameter before resolution. Anything that is not a number will be invoked literally. Note that passing a number will attempt to resolve by namespace, and if that fails, defaults to main.

Arguments

All arguments (except the first unnamed one, which is inferred to be the name of the template to invoke) are passed to the invoked template. {{Historical|0|1|2|3}} will pass {1, 2, 3} as arguments to the resolved template. Named arguments are recommended in place of unnamed in custom templates for this reason.

Examples

{{Historical}} renders a template based on the namespace:

{{Historical|christmas}} renders Template:Historical/christmas.

{{Historical|0}} renders Template:Historical/main.