Jump to content

سانچہ:documentation/documentation

وِکی‌لغت

سانچہ:documentation subpage سانچہ:uses lua This template automatically displays a documentation section like you are seeing now. The content of this section comes from a subpage named سانچہ:cd; e.g. the documentation for Template:affix is located on the page named سانچہ:cd. In order for this documentation to be displayed, templates must manually invoke سانچہ:tl inside of a سانچہ:cd section; see #Usage below. (However, سانچہ:tl is automatically invoked on module and JavaScript pages. The mechanism implementing this is described in more detail in the documentation for Module:documentation, which implements the سانچہ:tl template.)

Usage

[سودھو]
template code
...سانچہ:wtسانچہ:tempسانچہ:wt

or

سانچہ:wttemplate code . . .سانچہ:wt
سانچہ:temp

The most common practice is to place the سانچہ:temp template in سانچہ:wt tags. Alternatively, the template code itself can be wrapped in سانچہ:wt tags and the سانچہ:temp template should be outside of those tags. Both of these methods ensure that the documentation is not transcluded onto other pages as part of the template.

In order to place the template itself in a category, or supply interwiki links, put those categories and interwiki links on the documentation page, inside سانچہ:wt tags. If the documentation page contains سانچہ:wt or سانچہ:wt tags as part of the documentation, use سانچہ:tl or replace سانچہ:cd with سانچہ:cd.

Functions

[سودھو]

If the documentation page doesn't exist, the "edit" link includes a preload parameter so that clicking it will pre-fill the edit form with a stub documentation page.

Rationale

[سودھو]

Use of this template allows templates to be protected where necessary, while allowing anyone to edit the documentation, categories, and interwiki links. In addition, modules strictly require documentation pages as they cannot be categorized or documented any other way, so it makes sense to handle templates likewise.

See also

[سودھو]