How to Create an Infobox: Difference between revisions

m
Line 181: Line 181:


===Step Three - Placing the Infobox===
===Step Three - Placing the Infobox===
To place this infobox which again is nothing more than a template with the class of "infobox," we type the usual coding in which our example is <nowiki>{{Infobox sample}}</nowiki>.  However, it will be displayed as such:{{Infobox sample}}
To place this infobox which again is nothing more than a template with the class of "infobox," we type the usual coding in which our example is <nowiki>{{Infobox sample}}</nowiki>.  However, it will be displayed as such:{{Infobox sample}}.
 
Notice no information appears only the parameters inside the curly brackets.  We now have to add the following code to the placement of the template:
<nowiki>{{Infobox sample</nowiki><br>
<nowiki>|organization=</nowiki><br>
<nowiki>|president=</nowiki><br>
<nowiki>|address=</nowiki><br>
<nowiki>|phone=</nowiki><br>
<nowiki>|open hours=</nowiki><br>
<nowiki>}}</nowiki>


===Step Four - Limiting Parameters===
===Step Four - Limiting Parameters===
Some infoboxes can get very long.  If you list all the attributes of an organization can possibly there can be quit a few items listed.  What if you placing an infobox for a small organization, but are using the infobox for a large organizations with many offices you could end up with an infobox taking up a lot of room on the page with little information in it.  Maybe the organization does even have a phone number.  Well it is possible to code the infobox so that the item "phone" does not appear if there is none.  It is done simply by adding this coding to the parameter.
Some infoboxes can get very long.  If you list all the attributes of an organization can possibly there can be quit a few items listed.  What if you placing an infobox for a small organization, but are using the infobox for a large organizations with many offices you could end up with an infobox taking up a lot of room on the page with little information in it.  Maybe the organization does even have a phone number.  Well it is possible to code the infobox so that the item "phone" does not appear if there is none.  It is done simply by adding this coding to the parameter.
Interface administrators, smwadministrator, smwcurator, smweditor
82,369

edits