diff options
author | Derek Jones <derek.jones@ellislab.com> | 2011-07-02 00:40:48 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2011-07-02 00:40:48 +0200 |
commit | 4b9c62980599228f070b401c7673dce8085b0c61 (patch) | |
tree | 314bd87831a09913cbbfd1ffe1447b3c38b394c5 /user_guide/libraries/table.html | |
parent | 114ab0988e20ac6be39ad363ff897a1a3b85e565 (diff) |
backed out 648b42a75739, which was a NON-trivial whitespace commit. It broke the Typography class's string replacements, for instance
Diffstat (limited to 'user_guide/libraries/table.html')
-rw-r--r-- | user_guide/libraries/table.html | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html index a08f95032..eeb3b421f 100644 --- a/user_guide/libraries/table.html +++ b/user_guide/libraries/table.html @@ -130,11 +130,11 @@ echo $this->table->generate(); <h2>Changing the Look of Your Table</h2> -<p>The Table Class permits you to set a table template with which you can specify the design of your layout. Here is the template +<p>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:</p> <code> -$tmpl = array (<br /> +$tmpl = array (<br /> 'table_open' => '<table border="0" cellpadding="4" cellspacing="0">',<br /> <br /> 'heading_row_start' => '<tr>',<br /> @@ -159,14 +159,14 @@ $tmpl = array (<br /> $this->table->set_template($tmpl); </code> -<p class="important"><strong>Note:</strong> 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 +<p class="important"><strong>Note:</strong> 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.</p> -<p>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. +<p>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:</p> <code> -$tmpl = array ( 'table_open' => '<table border="1" cellpadding="2" cellspacing="1" class="mytable">' );<br /> +$tmpl = array ( 'table_open' => '<table border="1" cellpadding="2" cellspacing="1" class="mytable">' );<br /> <br /> $this->table->set_template($tmpl); @@ -176,7 +176,7 @@ $this->table->set_template($tmpl); <h1>Function Reference</h1> <h2>$this->table->generate()</h2> -<p>Returns a string containing the generated table. Accepts an optional parameter which can be an array or a database result object.</p> +<p>Returns a string containing the generated table. Accepts an optional parameter which can be an array or a database result object.</p> <h2>$this->table->set_caption()</h2> @@ -186,19 +186,19 @@ $this->table->set_template($tmpl); <h2>$this->table->set_heading()</h2> -<p>Permits you to set the table heading. You can submit an array or discrete params:</p> +<p>Permits you to set the table heading. You can submit an array or discrete params:</p> <code>$this->table->set_heading('Name', 'Color', 'Size');</code> <code>$this->table->set_heading(array('Name', 'Color', 'Size'));</code> <h2>$this->table->add_row()</h2> -<p>Permits you to add a row to your table. You can submit an array or discrete params:</p> +<p>Permits you to add a row to your table. You can submit an array or discrete params:</p> <code>$this->table->add_row('Blue', 'Red', 'Green');</code> <code>$this->table->add_row(array('Blue', 'Red', 'Green'));</code> -<p>If you would like to set an individual cell's tag attributes, you can use an associative array for that cell. The associative key <dfn>'data'</dfn> defines the cell's data. Any other key => val pairs are added as <dfn>key='val'</dfn> attributes to the tag:</p> +<p>If you would like to set an individual cell's tag attributes, you can use an associative array for that cell. The associative key <dfn>'data'</dfn> defines the cell's data. Any other key => val pairs are added as <dfn>key='val'</dfn> attributes to the tag:</p> <code>$cell = array('data' => 'Blue', 'class' => 'highlight', 'colspan' => 2);<br /> $this->table->add_row($cell, 'Red', 'Green');<br /> @@ -211,8 +211,8 @@ $this->table->add_row($cell, 'Red', 'Green');<br /> <p>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:</p> +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:</p> <code> $list = array('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve');<br /> @@ -241,7 +241,7 @@ $this->table->generate($new_list);<br /> <p>Permits you to set your template. You can submit a full or partial template.</p> <code> -$tmpl = array ( 'table_open' => '<table border="1" cellpadding="2" cellspacing="1" class="mytable">' );<br /> +$tmpl = array ( 'table_open' => '<table border="1" cellpadding="2" cellspacing="1" class="mytable">' );<br /> <br /> $this->table->set_template($tmpl); @@ -250,7 +250,7 @@ $this->table->set_template($tmpl); <h2>$this->table->set_empty()</h2> -<p>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:</p> +<p>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:</p> <code> $this->table->set_empty("&nbsp;"); @@ -258,7 +258,7 @@ $this->table->set_empty("&nbsp;"); <h2>$this->table->clear()</h2> -<p>Lets you clear the table heading and row data. If you need to show multiple tables with different data you should +<p>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:</p> <code> |