HRWiki:autocolumn

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(i think this is the right category for it)
(use valign="top" for most applications)
Line 24: Line 24:
:<code>width</code> &ndash; the remaining parameters are normal cell parameters
:<code>width</code> &ndash; the remaining parameters are normal cell parameters
:<code>align</code>
:<code>align</code>
-
:<code>valign</code>
+
:<code>valign</code> &ndash; setting this attribute to "top" is recommended for most wiki applications
:<code>class</code>
:<code>class</code>
:<code>style</code>
:<code>style</code>

Revision as of 17:05, 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 parameters
align
valign – setting this attribute to "top" is recommended for most wiki applications
class
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]]
*[[rock opera]]
*[[radio]]
</autocolumn>
</table>


Gallery

View the source code to see how each table was made. You can also experiment in the sandbox.

Selected Toons


Before
I
drink
a
tall
glass

of
melonade
I
like
to
eat

about
147
Fluffy
Puff
Marshmallows

Seriously
folks
they're
the
best

You
heard

it
folks

Homestar
likes

marshmallows

Personal tools