HRWiki:autocolumn
From Homestar Runner Wiki
It's dot com (Talk | contribs) m (→Example: this is a fake list, but it will bother me if one of these is out of order) |
It's dot com (Talk | contribs) ("top" is now the default valign value) |
||
Line 24: | Line 24: | ||
:<code>width</code> – the remaining parameters are normal cell parameters | :<code>width</code> – the remaining parameters are normal cell parameters | ||
:<code>align</code> | :<code>align</code> | ||
- | :<code>valign</code> – | + | :<code>valign</code> – "top" is the default value |
:<code>class</code> | :<code>class</code> | ||
:<code>style</code> | :<code>style</code> | ||
Line 36: | Line 36: | ||
==Example== | ==Example== | ||
<pre><nowiki><table width="80%"> | <pre><nowiki><table width="80%"> | ||
- | <autocolumn cols="3" width="33% | + | <autocolumn cols="3" width="33%"> |
*'''Debut:''' [[some kinda robot]] | *'''Debut:''' [[some kinda robot]] | ||
*[[i she be]] | *[[i she be]] | ||
Line 51: | Line 51: | ||
<table width="80%"> | <table width="80%"> | ||
- | <autocolumn cols="3" width="33% | + | <autocolumn cols="3" width="33%"> |
*'''Debut:''' [[some kinda robot]] | *'''Debut:''' [[some kinda robot]] | ||
*[[i she be]] | *[[i she be]] | ||
Line 71: | Line 71: | ||
|- | |- | ||
! colspan="5" style="background:#DDD" | Selected Toons | ! colspan="5" style="background:#DDD" | Selected Toons | ||
- | <autocolumn cols="5 | + | <autocolumn cols="5"> |
*[[20X6 vs. 1936]] | *[[20X6 vs. 1936]] | ||
*[[500 The Cheats]] | *[[500 The Cheats]] |
Revision as of 17:22, 21 February 2006
Description: An extension to easily create tables whose columns have equal lengths (or nearly so), especially for tables that are updated often.
Filename: wfAutoColumn.php
Written by: It's dot com ©2006
Please put any bugs or feature requests on the talk page.
Contents |
Format
<table [parameters]> <autocolumn [parameters]> [single list of content to be automatically divided] </autocolumn> </table>
Parameters
The parameters in the <table>
tag are the normal table parameters, and are optional.
The available <autocolumn>
parameters are listed below. Each one is optional.
cols
– the number of columns (the default is 2)width
– the remaining parameters are normal cell parametersalign
valign
– "top" is the default valueclass
style
You cannot have fewer than 2 columns, except that you cannot have more columns than total items in the list. The function removes all extra white space between the tags and then formats each column according to standard wiki markup rules.
Variations
- You can use wiki table markup (
{| ... |}
) instead of HTML. - You can have a header row.
- You can stack
<autocolumn>
rows within the same table.
Example
<table width="80%"> <autocolumn cols="3" width="33%"> *'''Debut:''' [[some kinda robot]] *[[i she be]] *[[guitar]] *[[island]] *[[japanese cartoon]] *[[personal favorites]] *[[different town]] *[[radio]] *[[rock opera]] *[[technology]] </autocolumn> </table>
|
Gallery
View the source code to see how each table was made. You can also experiment in the sandbox.
Selected Toons | ||||
---|---|---|---|---|
Before |
of |
about |
Seriously |
You |
it |
Homestar |
marshmallows |