Trichome

How to create reusable boilerplates

Pages intended to be reused as portions of other pages are called templates. The names of template pages start with the prefix Template:. A template can be included on another page using the syntax {{Page name}} (including the curly brackets), but leave out the Template: prefix between the curly brackets!

On Wikipedia, templates are created to serve a variety of purposes, such as navigation boxes (e.g. Template:Europe topic), infoboxes (e.g. Template:Infobox person), and notices (e.g. Template:Controversial).

If you wish to make a personal boilerplate (such as a personalized welcome message, or the like), you make it in your own userspace. Simply create the page as a subpage of your userspace (in the format User:Foo/something). To put it onto a page, use the curly brackets as usual, but remember to use the syntax {{User:Foo/something}} rather than {{something}}. This is because the curly-bracket syntax automatically looks in the Template namespace, so if you want to use one from your own userspace, you need to tell it to look there.

Read more:

Leave a Reply