Help:MediaWiki basics/Advanced training

From LIMSWiki
Jump to navigationJump to search

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:

  1. LIMS vendor
  2. LIMSWiki:Vendor page
  3. 2nd Sight Solutions
  4. National Cancer Institute
  5. LIMSWiki:Product page

After looking in the code for curly braces, we find...

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.

Citations

To begin using citations, it's easy to start with a copy/paste of existing citation code. Inline citations are added directly after a piece of information or quote in a body of wiki text.

You'll want to use this page as your initial guide: LIMSWiki:Citation guidelines

It details the citation code you'll use on probably 95 percent of the references you make: Cite web, Cite book, and Cite journal

You can copy code from there, paste it into your edit, and then edit the values of the fields. That page also has links to the original templates in case you need additional attributes not listed in the examples.

Also, it's imperative to include a references section on any page that includes inline citations. Otherwise, pages won't show up properly. You do that by placing the following code:

==References==
<references />