From 1f622294b92c095fd91e8ca44912d405c1605ded Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Thu, 7 Apr 2011 12:06:51 -0400 Subject: Wow, I screwed that up, Reactor is going to 2.0.2 not 2.0.1 --- user_guide/libraries/table.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide/libraries/table.html') diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html index 28994aa69..eeb3b421f 100644 --- a/user_guide/libraries/table.html +++ b/user_guide/libraries/table.html @@ -27,7 +27,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

-- cgit v1.2.3-24-g4f1b From 114ab0988e20ac6be39ad363ff897a1a3b85e565 Mon Sep 17 00:00:00 2001 From: Razican Date: Mon, 25 Apr 2011 17:26:45 +0200 Subject: Fixed double-space typo. --- user_guide/libraries/table.html | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'user_guide/libraries/table.html') diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html index eeb3b421f..a08f95032 100644 --- a/user_guide/libraries/table.html +++ b/user_guide/libraries/table.html @@ -130,11 +130,11 @@ echo $this->table->generate();

Changing the Look of Your Table

-

The Table Class permits you to set a table template with which you can specify the design of your layout. Here is the template +

The Table Class permits you to set a table template with which you can specify the design of your layout. Here is the template prototype:

-$tmpl = array (
+$tmpl = array (
                    'table_open'          => '<table border="0" cellpadding="4" cellspacing="0">',

                    'heading_row_start'   => '<tr>',
@@ -159,14 +159,14 @@ $tmpl = array (
$this->table->set_template($tmpl);
-

Note:  You'll notice there are two sets of "row" blocks in the template. These permit you to create alternating row colors or design elements that alternate with each +

Note:  You'll notice there are two sets of "row" blocks in the template. These permit you to create alternating row colors or design elements that alternate with each iteration of the row data.

-

You are NOT required to submit a complete template. If you only need to change parts of the layout you can simply submit those elements. +

You are NOT required to submit a complete template. If you only need to change parts of the layout you can simply submit those elements. In this example, only the table opening tag is being changed:

-$tmpl = array ( 'table_open'  => '<table border="1" cellpadding="2" cellspacing="1" class="mytable">' );
+$tmpl = array ( 'table_open'  => '<table border="1" cellpadding="2" cellspacing="1" class="mytable">' );

$this->table->set_template($tmpl); @@ -176,7 +176,7 @@ $this->table->set_template($tmpl);

Function Reference

$this->table->generate()

-

Returns a string containing the generated table. Accepts an optional parameter which can be an array or a database result object.

+

Returns a string containing the generated table. Accepts an optional parameter which can be an array or a database result object.

$this->table->set_caption()

@@ -186,19 +186,19 @@ $this->table->set_template($tmpl);

$this->table->set_heading()

-

Permits you to set the table heading. You can submit an array or discrete params:

+

Permits you to set the table heading. You can submit an array or discrete params:

$this->table->set_heading('Name', 'Color', 'Size'); $this->table->set_heading(array('Name', 'Color', 'Size'));

$this->table->add_row()

-

Permits you to add a row to your table. You can submit an array or discrete params:

+

Permits you to add a row to your table. You can submit an array or discrete params:

$this->table->add_row('Blue', 'Red', 'Green'); $this->table->add_row(array('Blue', 'Red', 'Green')); -

If you would like to set an individual cell's tag attributes, you can use an associative array for that cell. The associative key 'data' defines the cell's data. Any other key => val pairs are added as key='val' attributes to the tag:

+

If you would like to set an individual cell's tag attributes, you can use an associative array for that cell. The associative key 'data' defines the cell's data. Any other key => val pairs are added as key='val' attributes to the tag:

$cell = array('data' => 'Blue', 'class' => 'highlight', 'colspan' => 2);
$this->table->add_row($cell, 'Red', 'Green');
@@ -211,8 +211,8 @@ $this->table->add_row($cell, 'Red', 'Green');

This function takes a one-dimensional array as input and creates a multi-dimensional array with a depth equal to the number of -columns desired. This allows a single array with many elements to be -displayed in a table that has a fixed column count. Consider this example:

+columns desired. This allows a single array with many elements to be +displayed in a table that has a fixed column count. Consider this example:

$list = array('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve');
@@ -241,7 +241,7 @@ $this->table->generate($new_list);

Permits you to set your template. You can submit a full or partial template.

-$tmpl = array ( 'table_open'  => '<table border="1" cellpadding="2" cellspacing="1" class="mytable">' );
+$tmpl = array ( 'table_open'  => '<table border="1" cellpadding="2" cellspacing="1" class="mytable">' );

$this->table->set_template($tmpl); @@ -250,7 +250,7 @@ $this->table->set_template($tmpl);

$this->table->set_empty()

-

Let's you set a default value for use in any table cells that are empty. You might, for example, set a non-breaking space:

+

Let's you set a default value for use in any table cells that are empty. You might, for example, set a non-breaking space:

$this->table->set_empty("&nbsp;"); @@ -258,7 +258,7 @@ $this->table->set_empty("&nbsp;");

$this->table->clear()

-

Lets you clear the table heading and row data. If you need to show multiple tables with different data you should +

Lets you clear the table heading and row data. If you need to show multiple tables with different data you should to call this function after each table has been generated to empty the previous table information. Example:

-- cgit v1.2.3-24-g4f1b