Template:Feature

From NWN Lexicon
Jump to navigationJump to search
Note: This function may not work as expected in some situations, but it does work as intended. This is a "feature", not a bug. See Known Bugs for details.

[edit] [purge] Template Documentation

This template is used on a large number of pages.

In order to prevent unnecessary server load, edits should be kept to a minimum. Please experiment in your user page, and consider discussing your changes on the talk page before applying them.

Editing a template causes all pages that use the template to be re-rendered. If the template is used often, this can put a lot of load on the server since it fills up the job queue.

Usage

This template places a banner noting that the script or function documented in the article has a quirk that is not a bug but a "feature". Use this template at the top of the article so readers will be alerted to the "feature". Use this only for "features" that are already documented on the Lexicon. If you are unsure about whether the function is bugged or works as intended, do not use this template. Instead, start a discussion on the article's talk page.

It's possible for a function or script to have both "features" and bugs. In these cases, use both the feature template and the {{bug}} template.

Parameters

type

The type parameter can take a value of "script" or "function". This will change the template slightly to account for whether the "feature" is in a function or in a script (*.nss file). If you do not set this parameter, its default value is "function".

In an article about a function, either of these variants would be acceptable:

{{feature}}
{{feature|type=function}}

Both of these examples produce:

Note: This function may not work as expected in some situations, but it does work as intended. This is a "feature", not a bug. See Known Bugs for details.

However, in an article about a script, this would be the proper format:

{{feature|type=script}}

This produces:

Note: This script may not work as expected in some situations, but it does work as intended. This is a "feature", not a bug. See Known Bugs for details.

doc

The doc parameter can take a link to the location of the documentation about the bug. If you leave this parameter blank, it will default to the "Known Bugs" section of the page, but in the unlikely event that the proper documentation is in a different section or on another page entirely, you should set this parameter. Its content should be the wiki markup that would generate the desired link.

For example, if the documentation is on the article's talk page, you could use the following:

{{feature|doc=the [[{{TALKPAGENAME}}|talk page]]}}

This produces:

Note: This function may not work as expected in some situations, but it does work as intended. This is a "feature", not a bug. See the talk page for details.

Alternatively, you can elect to not use a link at all:

{{feature|doc=below}}
Note: This function may not work as expected in some situations, but it does work as intended. This is a "feature", not a bug. See below for details.

See Also

{{bug}}