Help:Infobox

From UBC Wiki
Jump to: navigation, search

An infobox is a fixed-format table usually added to the top right-hand corner of articles to consistently present a summary of some unifying aspect that the articles share and sometimes to improve navigation to other interrelated articles. Infobox are often like fact sheets, or sidebars, in magazine articles. They quickly summarize important points in an easy-to-read format. On the UBC Wiki they are often used to help organize course pages and projects.

How to Create a Simple Infobox

The best way to create a new infobox may be to copy and paste the code from an already existing infobox and then modify it to your specific needs.

Here is a very simple infobox:

Simple
Infobox
Card Catalogue.jpg
UBC Project Title
Welcome to the wiki for our project. This wiki is intended to be a space for to share and to contribute knowledge and resources related to this specific project.
Associated Pages


To re-create this infobox on your own wiki page, copy and paste the below code and then you can modify it to fit your specific needs.

{|  class="infobox"
! colspan="2" style="background:#002859; width:200px; color: white; font-weight:normal; font-size:11pt; padding-top: 0.5em; padding-bottom: 0.5em;" | Simple<br/>Infobox
|-
!scope="row" colspan="2"| [[Image:Card_Catalogue.jpg|264px]]
|-
! colspan="2" style="background:#7491a3; font-weight:normal; width:200px; color: white; font-size:10pt;" | UBC Project Title
|-
! colspan="2" style="font-size:9pt; font-weight:normal; width:200px; text-align:left; padding:0.5em;" | Welcome to the wiki for our project. This wiki is intended to be a space for to share and to contribute knowledge and resources related to this specific project.
|-
! colspan="2" style="background:#7491a3; width:200px; font-weight:normal; font-size:10pt; color: white;" | '''Associated Pages'''
|-
|
| style="font-size:9pt;" |
*[[Help:Main|Link to Specific Page]]
*[[Help:Main|Another Link]]
|}


Making an Infobox into a Template

Templates are standard wiki pages whose content is designed to be transcluded (embedded) inside other pages. Templates follow a convention that the name is prefixed with "Template:", assigning it to that namespace. Therefore to make your infobox into a template:

  • create your infobox on a new wikipage that starts with a Template Prefix (i.e. Template:My Infobox).
  • Then to add your template to any other wiki page, add {{Name of your template}}<nowiki> (e.g. <nowiki>{{My Infobox}} which 'transcludes' (i.e. includes a copy of) the content of the template (stored in the page [[Template:Name]] or [[Template:My Infobox]]).
  • If you update your infobox, the displayed transcluding pages will automatically change too.

Additional Resources