Loading...
 
Skip to main content

History: PluginFancyTable

Preview of version: 51

Plugin FancyTable

This plugin displays the data using the Tiki odd/even table style. Settings allow the table to be sortable by multiple rows, cause rows to span multiple columns and vice versa, set individual column widths and align text horizontally and vertically.

Usage

The data (and the head parameter) is given one row per line, with columns separated by | (with version 4.0 and higher) or ~|~.

To display a fancy table in a wiki page, use the syntax:

Copy to clipboard
{FANCYTABLE(head=h1c1|h1c2|h1c3>>h2c1|h2c2|h2c3 , headclass= , headaligns=left|right|center|justify , headvaligns=top|middle|bottom|baseline , colwidths= , colaligns=left|right|center|justify , colvaligns=top|middle|bottom|baseline , sortable= , sortList= )}cells{FANCYTABLE}

Copy to clipboard
{FANCYTABLE(head=> ,headclass=> )}cells{FANCYTABLE}

Parameters

Prerequisites and Tips

  • The following must be enabled for the table sort to work:
    • The Disable Javascript option at Admin Home > General > Logging and Reporting should be unchecked
    • The JQuery Sortable Tables option at Admin Home > Features > Interface should be checked

  • Sorting a table with cells that span multiple columns or rows can give unexpected results

  • Starting with Tiki7, place any | or ~|~ that you don't want interpreted as cell dividers (or anyinside of the ~np~ and ~/np~ tags. Other tags and plugins within the table content that may have been buggy before should be handled properly with Tiki7.

Examples

Sortable Table

The sortlist parameter setting below causes the table to be sorted first by the first column and then by the second column.

This code:

Copy to clipboard
{FANCYTABLE( head=" Quantity | Vegetables | Fruits", sortable="y",sortList="[0,0],[1,0]")} 10 | onions | apples 10 | cucumbers | lemons 100 | carrots | oranges 10 | tomatoes | water melons 50 | peas | strawberries {FANCYTABLE}

Would produce:

Cells Spanning More Than One Row

This code:

Copy to clipboard
{FANCYTABLE( head=" Type | Value ")} \\Vegetable | onions carrots \\\Fruits | lemons tomatoes strawberries {FANCYTABLE}


Would produce:

Type Value
Vegetable onions
carrots
Fruits lemons
tomatoes
strawberries

Multiple live filtering

Since Tiki12, when you set sortable to y, you also get a line with fields to filter your data by matching a search string in one or more columns.

Example from http://i18n.tiki.org/Status :
Content is like:

Copy to clipboard
{FANCYTABLE(head="Language code (ISO)|English name|Native Name|Completion|Percentage|Number of strings", sortable="y")} ar | Arabic | العربية | {gauge value="2,29" size="100" showvalue="false"} | 2,29% | Total: 14923 %%% Translated: 341 %%% Untranslated: 14582 bg | Bulgarian | български език | {gauge value="0,01" size="100" showvalue="false"} | 0,01% | Total: 14922 %%% Translated: 2 %%% Untranslated: 14920 ca | Catalan | Català | {gauge value="39,22" size="100" showvalue="false"} | 39,22% | Total: 14996 %%% Translated: 5882 %%% Untranslated: 9114 ... {FANCYTABLE}


The table upper paert looks like this:

Click to expand
Click to expand


Then you can sort by one or more columns, and filter you results by searching for some string in one or more columns. In the example below, sorted by one column ("Percentage"), and filtered by content in another column ("Native name" containing "de"):

Click to expand
Click to expand



History

Information Version
lindon 98
FootlooseTraveller 97
Yves Kipondo 96
lindon Edit restored by rescue script 2017-04-24T18:09:12+00:00 95
Bernard Sfez / Tiki Specialist Fancy Table Plugin modified by editor. 94
lindon 93
lindon 92
lindon 91
lindon 90
lindon 89
lindon 88
lindon 87
lindon 86
lindon 85
lindon 84
lindon 83
lindon 82
lindon 81
lindon 80
lindon 79
lindon 78
lindon Fancy Table Plugin modified by editor. 77
lindon 76
lindon 75
lindon 74
lindon 73
lindon 72
lindon 71
Xavier de Pedro 70
lindon 69
lindon 68
lindon 67
lindon 66
lindon 65
lindon 64
lindon 63
lindon 62
lindon Fancy Table Plugin modified by editor. 61
lindon 60
lindon 59
lindon 58
lindon 57
lindon 56
lindon 55
lindon 54
lindon 53
Xavier de Pedro 52
Xavier de Pedro 51
lindon 50
lindon Fancy Table Plugin modified by editor. 49
  • «
  • 1 (current)
  • 2