Difference between revisions of "Template:Sortable"

From CCS Cataloging Manual
Jump to navigation Jump to search
(Template for sortable wiki tables)
 
(Added usage description)
 
Line 1: Line 1:
border="1" cellpadding="4" cellspacing="0" style="border:#c9c9c9 1px solid; margin: 1em 1em 1em 0; border-collapse: collapse;" class="sortable"
border="1" cellpadding="4" cellspacing="0" style="border:#c9c9c9 1px solid; margin: 1em 1em 1em 0; border-collapse: collapse;" class="sortable"
<noinclude>
==Usage==
Add this template in the first line of a wiki markup table to not only make the table look like Wikipedia tables, but also make the table sortable by column.
==Example==
This table
<pre>{| <nowiki>{{sortable}}</nowiki>
! Column 1 !! Column 2
|-
| A || B
|-
| C || D
|}</pre>
displays as:
{| {{sortable}}
! Column 1 !! Column 2
|-
| A || B
|-
| C || D
|}
</noinclude>

Latest revision as of 22:59, 22 July 2009

border="1" cellpadding="4" cellspacing="0" style="border:#c9c9c9 1px solid; margin: 1em 1em 1em 0; border-collapse: collapse;" class="sortable"

Usage

Add this template in the first line of a wiki markup table to not only make the table look like Wikipedia tables, but also make the table sortable by column.

Example

This table

{| {{sortable}}
! Column 1 !! Column 2
|-
| A || B
|-
| C || D
|}

displays as:

Column 1 Column 2
A B
C D