docs.roxen.comView this page in a printer friendly mode
DocsRoxenWebServer 5.1Web Developer ManualText Tags
Copyright © 2013, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com

   

<ai>
<autoformat>
<basename>
<case>
<charset>
<comment>
<?comment ?>
<default>
<dirname>
<doc>
<foldlist>
<format-number>
<obox>
<random>
<recode>
<replace>
<sed>
<smallcaps>
<sort>
<strlen>
<substring>
<tablify>
<trimlines>
<wash-html>

<tablify></tablify>

Provided by module: Tags: Tablify

Transforms texts into tables. The default behavior is to use tabs as column delimiters and newlines as row delimiters. The values in the first row as assumed to be the title. Note in the example below how empty rows are ignored. As is shown in the last line a row does not need to be complete for tablify to work properly. These missing cells will get &nbsp; as content to force all cells to be drawn if borders are on, thus avoiding broken layout when, e.g. a dynamic variable happens to be empty. No attributes are required for tablify to work.

<tablify border='1'> X Y Z 3 10 77 1 2 10 4 13 3 1 2 </tablify>
31077
1210
4133
12 

Tablify also prescans the entire table to find the widest number of cells.

<tablify border='1'> A B a b aa bb aaa bbb ops! </tablify>
 
ab 
aabb 
aaabbbops!

Attributes

rowseparator="string" (newline)

Defines the character or string used to seperate the rows.


cellseparator="string" (tab)

Defines the character or string used to seperate the cells.

<tablify cellseparator=','> Element, Mass H, 1.00797 He, 4.0026 Li, 6.939 </tablify>
Element  Mass 
H 1.00797
He 4.0026
Li 6.939

intable

If the intable attribute is set the tablify module will parse the indata as a table.

<tablify nice='1' intable='1'> <table><tr><th>Element</th><th>Mass</th></tr> <tr><td>H</td><td>1.00797</td></tr> <tr><td>He</td><td>4.0026</td></tr> <tr><td>Li</td><td>6.939</td></tr> </table> </tablify>
Element Mass 
H  1.00797  
He  4.0026  
Li  6.939  

notitle

Don't add a title to the columns and treat the first row in the indata as real data instead.


interactive-sort

Makes it possible for the user to sort the table with respect to any column.


sortcol="number"

Defines which column to sort the table with respect to. The leftmost column is number 1. Negative value indicate reverse sort order.


min="number"

Decides which of the input rows should be the first one to be displayed. This can be used to skip unwanted rows in the beginning of the data. The first row after the heading is row number 1.


max="number"

Decides which of the input rows should be the last one to be displayed. This can be used to limit the the output to a maximum number of rows.

<tablify min='2' max='4'> Stuff one two three four five six </tablify>
Stuff 
two
three
four

negativecolor="color" (#ff0000)

The color of negative values in economic fields.


border="number"

Defines the width of the border. Default is 2 in nice and nicer modes. Otherwise undefined. The value is propagated into the resulting table tag if neither nice nor nicer is used.


cellspacing="number"

Defines the cellspacing attribute. Default is 0 in nice and nicer modes. Otherwise undefined. The value is propagated into the resulting table tag if neither nice nor nicer is used.


cellpadding="number"

Defines the cellpadding attribute. Default is 4 in nice and nicer modes. Otherwise undefined. The value is propagated into the resulting table tag if neither nice nor nicer is used.


width="number"

Defines the width of the table.


cellalign="{left, center, right}"

Defines how the cell contents should be align by default. The value is propagated into the resulting td tags if neither nice nor nicer is used.


cellvalign="{top, middle, bottom}"

Defines how the cell contents should be verically aligned. The value is propagated into the resulting td tags if neither nice nor nicer is used.


The 'nice' attribute

nice

Add some extra layout to the table. More specifically it creates a bakcground table with another color and then colors all the cells in the inner table. All attributes below only applies in nice or nicer mode.

<tablify nice='1' cellseparator=','> Element, Mass H, 1.00797 He, 4.0026 Li, 6.939 </tablify>
Element  Mass 
H   1.00797  
He   4.0026  
Li   6.939  
<tablify nice='1' cellseparator=',' cellspacing='1'> Element, Mass H, 1.00797 He, 4.0026 Li, 6.939 </tablify>
Element  Mass 
H   1.00797  
He   4.0026  
Li   6.939  

grid="number"

Draws a grid with the thickness given.

<tablify nice='1' grid='1'> Element Mass H 1.00797 He 4.0026 Li 6.939 </tablify>
Element Mass 
H  1.00797  
He  4.0026  
Li  6.939  

bordercolor="color" (#000000)

The color of the border.


titlebgcolor="color" (#112266)

The background color of the title.


titlecolor="color" (#ffffff)

The color of the title.


modulo="number"

Defines how many rows in a row should have the same color.

<tablify nice='1' cellseparator=',' modulo='2'> Element, Mass H, 1.00797 He, 4.0026 Li, 6.939 Be, 9.0122 B, 10.811 </tablify>
Element  Mass 
H   1.00797  
He   4.0026  
Li   6.939  
Be   9.0122  
B   10.811  

oddbgcolor="color" (#ffffff)

The first background color.


evenbgcolor="color" (#ddeeff)

The second background color.


The 'nicer' attribute

nicer

Add some extra extra layout to the table. Compared with nice-mode it gtexts the column titles and adds a font-tag in all cells. All attributes below only applies in nicer mode. Nicer requires the gtext module.

<tablify nicer='1'> Element Mass H 1.00797 He 4.0026 Li 6.939 </tablify>
Element Mass 
H  1.00797  
He  4.0026  
Li  6.939  

noxml

Don't terminate the images with slashes, as required by XML.


font="text" (lucida)

The font gtext should use to write the column titles with.

<tablify nicer='1' cellseparator=', ' font='andover' fontsize='24'> Element, Mass H, 1.00797 He, 4.0026 Li, 6.939 </tablify>
Element Mass 
H  1.00797  
He  4.0026  
Li  6.939  

fontsize="int" (13)

The size of the gtext font used to write the column titles with.


scale="float"

Scales the gtext font used to write the column titles with.


textcolor="color" (#000000)

The color of the text. This will also work with economic fields in any mode.


size="number" (2)

The size of the table text.


face="string" (helvetica,arial)

The font of the table text, e.g. the value of the face attribute in the font tag that encloses every cell.


<fields></fields>

Provided by module: Tags: Tablify

The container 'fields' may be used inside the tablify container to describe the type of contents the fields in a column has. Available fields are:

  • text (default)

  • left

  • center

  • right

  • num

  • int

  • economic-int

  • float

  • economic-float

All fields except text overrides the cellvalign attribute.

<tablify nice='nice'> <fields separator=','> text,center,right,float,economic-float,int,economic-int </fields> text center right float economic-float int economic-int 123.14 123.14 123.14 123.14 123.14 123.14 123.14 56.8 56.8 56.8 56.8 56.8 56.8 56.8 -2 -2 -2 -2 -2 -2 -2 </tablify>
text center right float economic-float int economic-int 
123.14  123.14  123.14  
123.14
123.14
123123
56.8  56.8  56.8  
56.8
56.8
5757
-2  -2  -2  
-2.0
-2.0
-2-2

Attributes

separator="string"

Defines the field type separator.

The fields types are separated by

  1. The value given in the separator attribute to fields.

  2. The value given in the cellseparator attribute to tablify.

  3. Tab.