User:WikiWriter/Sandbox/Alertboxes

MediaWiki templates can use other templates - this allows common elements of any template to be hidden in a general-purpose template that can be used by a special-purpose template.

alert_box_80
The general-purpose template used for alert-boxes is the alert_box_80 template - the '80' being a reference to the fact that it takes up 80% of the page width - the following markup shows the template is a simple two-cell table requiring 3 parameters for customisation.

In MediaWiki markup - parameters in templates are numbers between triple 'curly brackets'  .

Example - using 'alert_box_80' to create 'page_under_construction'
The page_under_construction template is a special-purpose template based on the alert_box_80 template. In an KnowledgebaseWiki article - the 'page_under_construction' appears as : And its markup appears :

In the first line you can see the reference to the alert_box_80 template - with its specialising parameters :
 * 'cornflowerblue' - being the colour of the left-hand border
 * 'construction-50px.png' - being the name of the image used
 * 'This KnowledgebaseWiki article ...' - being the text shown

To create another alert-box - there is no need for you to even look at the alert_box_80 template - just use it as the <tt>page_under_construction</tt> template uses it.

Icons from Wikimedia Commons
You can find many images for use in alertboxes in the Wikimedia Commons - for example :
 * Icons by subject
 * Tool icons