Template:Feature

From NWN Lexicon
Green bug icon.png 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 info icon.png Template Documentation

Warning icon orange.png 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.

Information icon.png 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.

Contents

[edit] 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.

Information icon.png 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.


[edit] Parameters

[edit] 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:

Green bug icon.png 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:

Green bug icon.png 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.

[edit] 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:

Green bug icon.png 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}}
Green bug icon.png 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.


[edit] See Also

{{bug}}

Personal tools
Categories