Help:MediaWiki basics/Advanced training
This is advanced training material for MediaWiki. If you still have problems after reviewing and practicing the material found here and in the beginner and intermediate guides, you can request help on this discussion page. |
Advanced formatting in MediaWiki
Note: When opening links from wiki pages, right-click a link and choose to open it in a new tab. This should make navigating your way through the wiki less complex.
Templates
Let's get back to that box with text and a big blue "i" at the top. We call that an "infobox." That's created using the template "ombox". Templates are held in their own special namespace on the wiki. Open the previously mentioned ombox link in a new tab to learn more about this template. As you review it, you'll notice the parameters that can be associated with this template:
{{ombox | type = speedy / delete / content / style / notice / move / protection | image = none / [[Image:Some image.svg|40px]] | imageright = [[Image:Some image.svg|40px]] | style = CSS values | textstyle = CSS values | text = The message body text. | small = {{{small|}}} / yes | smallimage = none / [[Image:Some image.svg|30px]] | smallimageright = none / [[Image:Some image.svg|30px]] | smalltext = A shorter message body text. }}
A proper template page will also include documentation on how to use it, so don't feel too overwhelmed. For now, know template formatting is distinct because placing a template in another pages involves placing two opening braces in front (like this: {{ ), the name of the template, the desired parameters associated with it, and finally two closing braces in the back (like this: }} ), just as seen in the example above.
Here are some internal links to pages on this wiki that utilize a variety of different templates. Let's open each page in a new tab and choose the "edit" option to see the code. Then, let's identify all the templates used in those pages:
- LIMS vendor
- LIMSWiki:Vendor page
- 2nd Sight Solutions
- National Cancer Institute
- LIMSWiki:Product page
After looking in the code for curly braces, we find...
- Item one uses: Template:Ombox; Template:Cite web
- Item two uses: Template:Infobox company; Template:Ombox
- Item three uses: Template:Infobox company; Template:Ombox productfeature; Template:Databox LIMSfeature; Template:Cite web
- Item four uses: Template:Infobox government agency; Template:Cite news; Template:Cite web; Template:Ombox productfeature; Template:Databox LIMSfeature
- Item five uses: Template:Infobox laboratory equipment; Template:Ombox; Template:Infobox software; Template:Start date; Template:Start date and age
Notice the wide variety of templates already in use. Looking at a complete list of templates perhaps makes the topic even more daunting. Don't be afraid; templates have very practical uses and make information presentation more standardized and rapid. As for determining what the most-used templates are on this wiki... that's a more difficult task. However, the sampling above should give you an idea that ombox, citation, infobox, and databox templates are used often.
Consult the relevant Help:Contents section or the MediaWiki handbook for more information.