Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:AutosortTable/doc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Styling a column ==== An individual column can be styled separately by using CSS in the ''colstyle'' argument. In the '''Old friends''' example just above, the alignment has been set to <code>text-align:left;</code> and <code>text-align:right;</code>, respectively. Consider this similar table: <pre><code><nowiki> {{#invoke: AutosortTable| create | class = wikitable plainrowheaders sortable | separator = -- | order = 2 | numeric =2 | descending = 2 | caption=Old friends again | rowheader = 1 | header = -- Name -- Age -- Diet <!-- Table header --> | -- Maria -- 36 -- Vegan <!-- Row 1 --> | -- Peter -- 35 -- Vegetarian <!-- Row 2 --> | -- Julia -- 35 -- Meat <!-- Row 3 --> | -- James -- 50 -- Vegan <!-- Row 4 --> | -- Henry -- 45 -- Meat <!-- Row 5 --> | -- Ireni -- 47 -- Fish, no meat <!-- Row 6 --> | colstyle = -- -- font-weight:bold; color:brown -- background-color:yellow }} </nowiki></code></pre> {{#invoke: AutosortTable| create | class = wikitable plainrowheaders sortable | separator = -- | order = 2 | numeric =2 | descending = 2 | caption=Old friends again | rowheader = 1 | header = -- Name -- Age -- Diet <!-- Table header --> | -- Maria -- 36 -- Vegan <!-- Row 1 --> | -- Peter -- 35 -- Vegetarian <!-- Row 2 --> | -- Julia -- 35 -- Meat <!-- Row 3 --> | -- James -- 50 -- Vegan <!-- Row 4 --> | -- Henry -- 45 -- Meat <!-- Row 5 --> | -- Ireni -- 47 -- Fish, no meat <!-- Row 6 --> | colstyle = -- -- font-weight:bold; color:brown -- background-color:yellow }} The "Age" column entries are now in bolded brown and no longer left-aligned as in the previous example. The "Diet" column here has the specified yellow background. <!-- Still working on this; need to find/invent examples (22 September 2021 -JohnFromPinckney) === Multiple headers? === What do the <s>'create', 'order', 'numeric', and 'ascending'/'descending'</s> parameters mean, how do they function, and how do I use <s>'colspan' and 'rowspan', and use</s> multiple headers or place headers in different locations on Module:AutosortTable<s>, and how do I auto-sort tables and use the 'create', 'order', 'numeric', and 'ascending'/'descending' parameters on tables</s>? {{#invoke: AutosortTable| create | class = wikitable plainrowheaders sortable | style= | separator = -- | order = 4,1 | numeric =4 | descending = 4 | caption=Wikipedia editions | rowheader = 1 |header = --Animal--Language--Script--WP code | --Crocodile--[[English language|English]]--<code>[[Latin alphabet|Latn]]</code>--61 | --Walrus--[[English language|English]]--<code>[[Latin alphabet|Latn]]</code>--19 | --Duck--[[English language|English]]--<code>[[Latin alphabet|Latn]]</code>--4 | --Alligator--[[English language|English]]--<code>[[Latin alphabet|Latn]]</code>--3 | --Platypus--[[English language|English]]--<code>[[Latin alphabet|Latn]]</code>--1 | --Emu--[[English language|English]]--<code>[[Latin alphabet|Latn]]</code>--61 | --Zebra--[[English language|English]]--<code>[[Latin alphabet|Latn]]</code>--4 | --Muskrat--[[English language|English]]--<code>[[Latin alphabet|Latn]]</code>--19 }} Still working on this -->
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)