Difference between revisions of "Help:Template"

(Add help information on templates.)
 
 
Line 37: Line 37:
  
 
==External References==
 
==External References==
See the [https://wiki.archlinux.org/title/Help:Template Arch Linux Wiki template help page] for more detailed information.
+
* See the [https://wiki.archlinux.org/title/Help:Template Arch Linux Wiki template help page] for more detailed information.
 +
* [https://www.mediawiki.org/wiki/Help:Templates MediaWiki page on templates]

Latest revision as of 21:47, 10 May 2021

A template is a piece of wikitext that can be inserted into a page. Mostly used to aid in formatting and to duplicate common content.

Usage[edit source]

Templates can be used by adding markup to the page:

{{Template name}} 

Templates can take additional arguments, such as Template:Note:

{{Note|note|this text is a note.}} 

with the output:

Note: this text is a note.

Sometimes named parameters can be used:

{{hc|head=main.c|output=#include <stdint.h>}} 

With the output

main.c
#include <stdint.h>

The general format is:


{{Template name|param1|param2|...}} 

Each template has a page with usage instructions and examples.

List of Templates[edit source]

Listed below are all templates indented to be used in pages.

Warning: Any changes to templates will effect all pages using that template. Consider making a sandbox copy to test with before committing modifications.

Name Use Parameters
Template:Ic Inline code. 1 - code
Template:Bc Code block or preformatted text section. 1 - code
Template:Hc File contents of preformatted text with a header name. 1 - title, 2 - output
Template:Note Special information box, with different types for different colors. 1 - type, 2 - text

External References[edit source]

No categories assignedEdit