16-17 May 2019 • Sofia, Bulgaria

Submission: 1 February 2019 • Notification: 1 March 2019 • Final Version: 1 April 2019

Help:Templates

From Ifigenia, the wiki for intuitionistic fuzzy sets and generalized nets
Jump to: navigation, search
First steps Page editing Page management Namespaces Tools and settings
Starting a new page • Edit mode • Text formatting • Formulas • Tables • Images • Categories • Templates • References • Subpages

The wiki templates are pages from the Template: namespace (id 10), which give the possibility for inclusion of one and the same piece of source code (text, graphics, formatting) on multiple pages. Templates allow whenever edits and updates of the information are necessary, to make these only once in the template page, and the changes get automatically visible on the pages calling the template. This dynamic use of the templates is called transclusion.

The transclusion functionality is available not only to the pages from the Template: namespace, but also to pages and subpages from other namespaces. For instance, there are certain situations requiring transclusion of pages and subpages from the main namespace, but in general this role is given to the templates.

The main reasons to export a piece of information into a template, are:

  • easy support — when the information has to be included on multiple pages and often requires update or editing.
  • economy — when the repetitive piece of information is large in size.
  • formatting style consistency — when the same functional and aesthetic design has to be applied on multiple pages.

Transclusion occurs any time when the pagename of the template page has been typed in another wiki page and enclosed by a pair of curly brackets. The button Button template.png may also be used for this purpose. For instance,

{{at}}

gives: At sign.png (i.e. Image:At_sign.png with image width of 12px, used as an antispam security measure to replace the regular @ sign in email addresses).

Templates may have optional or obligatory parameters, separated from the template name and among themselves by means of the pipe character |. For instance, template {{download|||}} has three obligatory parameters, first is filename of an uploaded file, second is file format, third is file size. Thus:

{{download|Download-icon.png|PNG|3}}

gives: Download-icon.png PNG (3 Kb, Info) Download-icon.png .

Certain templates are made in such a way, to automatically categorize the pages, which call them. For instance, template {{stub}} categorizes the pages as stubs (short articles that need to be enlarged).

Some templates are very easy, but others require a little bit of programming and knowledge of CSS.

See also