User:Wonghk3/Sandbox/WikiTextA3

CH-10: TABLES-COL ONLY
FOLLOW samples on tutorial page... Tables-Columns Only

TABLE WITH COLUMNS ONLY

RECALL: How to create a BASIC two-row TABLE

EXPLAIN: We can also create a table using a SINGLE ROW.
 * The number of cells would equal the number of columns to be displayed.
 * Items will be listed under each cell preceeded by an asterisk.
 * Add a width attribute to the TABLE-tag to spread the resulting columns across the page.

RESULTS

EXAMPLE: REVIEW an actual page in Wiki
 * Go to New Hampshire Genealogy, then Counties Header
 * Note how the Counties appear; do an 'Edit Source' on this header
 * Note how the Counties are linked to their corresponding county page

CH-11: TABLES-COL SPANS
FOLLOW samples on tutorial page... Tables-Column Spans

SPANNING COLUMNS IN TABLES Sometimes we want a cell to cover more than one column For example, how can we combine two table headings?

HOW TO SPAN COLUMNS

STEP-1: USE a class called "colspan" in the | or ! tag STEP-2: ADD width attribute to the | or ! tag STEP-3: DELETE the other two | or ! lines

EXAMPLE: With Column Span
RESTRICTIONS: (1) Columns must add up; and, (2) cannot create sortable tables with colspans

CH-12: TABLES-ROW SPANS
FOLLOW samples on tutorial page... Tables-Row Spans

SPANNING ROWS IN TABLES Besides spanning columns, we can span rows.

HOW TO SPAN ROWS

STEP-1: USE a class called "rowspan" in the | tag STEP-2: DELETE the first line of the third and fourth row tags; it is a combined cell

EXAMPLE: Row Span without deleting the first line of the 3rd and 4th rows
RESTRICTIONS: Cannot create sortable tables with rowspans

CH-13: TEMPLATES
FOLLOW samples on tutorial page... Templates

DEFINITION of a TEMPLATE
 * a container of FIXED (non-changing) CODE that can be embedded anywhere on a page and onto many pages
 * may be text, tables, images, etc
 * used to standardize page sections
 * some templates allow for us to input 'values' that provide data or links to a page

SHOW EXAMPLES
 * Example of text/table: Aberton Parish
 * Check the breadcrumb trail, Jurisdiction Infobox, and Navbox...all are tables made into a Template


 * Example of image template:

HOW TO CREATE A TEMPLATE 1. Created the same way an ordinary article is created 2. In Search box, type Template:user-defined Template-name 3. Click on Create the page 4. Build template instructions in the edit box, then save page

HOW TO EDIT A TEMPLATE go to page where template is used, click on edit source Click Scroll to the bottom of the page and note list of templates Click Locate template of interest, then click on "Edit" OR

if you know the template, search on that template use example

CAUTION: Editing a template will change all pages where this template is embedded. Many templates have sub-templates within them which makes following the code difficult

HOW TO EMBED A TEMPLATE ENTER onto the page without the word Template

use sample

HOW TO EDIT ONLY ONE EMBEDDED TEMPLATE (use subst:template-name}}
 * To allow a template to be customized only on one page without changing the other pages using that template
 * When a template is embedded in this manner and one clicks "Edit this Page", they will see all the code used to create the template

ENTER to embed template on that one page

LIMITATIONS The size of a template is defined by the code used IN that template and cannot be adjusted when embedding

==== ==== ==== ====

CH-14: INFOBOX- CREATING
FOLLOW samples on tutorial page... Infobox - Creating

WHAT ARE INFOBOXES


 * A specialized table in the form of a display box placed on a page.
 * The box contains quick references about people, locations, organizations, or administrative divisions.

ADVANTAGES OF INFOBOXES


 * ability to add/change info within them w/o editing the template
 * template can be changed on a particular page using "subst:" procedure
 * are coded to be edited only for the page on which they are embedded

CREATING AN INFOBOX WITH RENAMED PARAMETERS


 * Coding includes: open/close Table-tags, rows, and cells
 * the box is floated to the right side of the page using the attribute "float:right" in the Table-tag
 * first two rows use colspan="2" code to combine two columns in the table
 * parameters are added to accept user-input values by placing opening and closing curly brackets in the table: 
 * rename the parameters by ADDING a pipe after the parameter name, then ADDING an explanatory parameter name



SAVING THE INFOBOX template:Name of Society Infobox
 * Save the template using the word infobox in the title

CH-15: INFOBOX - PLACING
FOLLOW samples on tutorial page... Infobox - Placing

PLACING (EMBEDDING) AN INFOBOX; ADDING PARAMETER VALUES STEP 1: copy this infobox template into sandbox
 * Now that we've created (and presumably saved) an infobox, we need to place or embed that infobox onto a page.
 * I will demonstrate the steps using an infobox named  

STEP 2: add the parameters you used when you created the infobox between the curly brackets (I happened to look it up for this infobox)

STEP 3: add the values for each parameter, then 'show preview'


 * SEE RESULTS on right of page
 * Here's an EXAMPLE of infobox coding with values for Jackson County, Missouri


 * Here's an EXAMPLE of a Wiki Page (use to review coding): Abberley Parish, England

CH-16: IMAGE MAPS
FOLLOW instructions on tutorial page... Image Maps