User:Ccsmith/sandbox/wiki

=FamilySearch Wiktext Infobox - Continued=

Collapsing Infoboxes
In our example from the last lesson, we have limited the items shown for our organization. But as you know many organizations have far more offices and other items that would be worth knowing that should be in these infoboxes.
 * What we would like to happen then is when a parameter is filled in, it shows.
 * However when it is blank, the item does not show in the infobox. In other words, if the organization does not have a phone number, there will not be a line or a blank space for it.
 * Well it is possible to code the infobox so that the item like a "phone" does not appear if there is none. Well that is possible with another bit of coding call "if functions."   It is done simply by adding this coding to the parameter.
 * This is an example of adding the additional code to the President line:


 * This coding looks a bit intimidating but it is really not that hard. For further insight see: if functions

You can create long infoboxes
With this coding, you can create a complete infobox that covers all the items you think are necessary, but has the ability to be flexible enough to shrink if not all the items are present such as a vice president or web site address.

Try these out
 Exercises

Use this coding for this exercise: Lets make this into a infobox: Check your answers
 * 1) Put a border around the infobox, limit the width to 190 pixels and make it so that will always be on the right side of the page.
 * 2) Put borders around each of the cells.
 * 3) Have the cells containing the words organization and image span both columns.
 * 4) Center the name of the organization and the image in their cells.
 * 5) Make the items in the right hand cells into parameters.

 Quick Quiz
 * Parameters have two opening and closing curly brackets surrounding them.
 * A. True
 * B. False


 * Infoboxes usually are located at the top of the page on the right side.
 * A. True
 * B. False


 * Infoboxes are saved just like other templates but it is good practice to included the word "infobox" in its title.
 * A. True
 * B. False

Check your answers