diff options
author | Greg Aker <greg.aker@ellislab.com> | 2011-04-27 08:47:47 +0200 |
---|---|---|
committer | Greg Aker <greg.aker@ellislab.com> | 2011-04-27 08:47:47 +0200 |
commit | a6507905578f1cf209776ae3d53099a005a06823 (patch) | |
tree | 9f23bb557f920034cf65c86059c84e37efd34d79 /user_guide/libraries/parser.html | |
parent | 60ef4ea72e169e174ff8dbb421609a178a3c0c48 (diff) | |
parent | 25d495b4a2598f771a858108a2cd2e96f0130412 (diff) |
merging in changes
Diffstat (limited to 'user_guide/libraries/parser.html')
-rw-r--r-- | user_guide/libraries/parser.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/user_guide/libraries/parser.html b/user_guide/libraries/parser.html index cb2f100a2..4f04aaf48 100644 --- a/user_guide/libraries/parser.html +++ b/user_guide/libraries/parser.html @@ -83,10 +83,10 @@ variables or variable tag pairs. If you've never used a template engine, pseudo- PHP from your templates (view files).</p> <p class="important"><strong>Note:</strong> CodeIgniter does <strong>not</strong> require you to use this class -since using pure PHP in your view pages lets them run a little faster. However, some developers prefer to use a template engine if +since using pure PHP in your view pages lets them run a little faster. However, some developers prefer to use a template engine if they work with designers who they feel would find some confusion working with PHP.</p> -<p><strong>Also Note:</strong> The Template Parser Class is <strong>not</strong> a +<p><strong>Also Note:</strong> The Template Parser Class is <strong>not</strong> a full-blown template parsing solution. We've kept it very lean on purpose in order to maintain maximum performance.</p> @@ -102,7 +102,7 @@ full-blown template parsing solution. We've kept it very lean on purpose in orde <h2>$this->parser->parse()</h2> -<p>This method accepts a template name and data array as input, and it generates a parsed version. Example:</p> +<p>This method accepts a template name and data array as input, and it generates a parsed version. Example:</p> <code>$this->load->library('parser');<br /> <br /> @@ -114,11 +114,11 @@ $data = array(<br /> $this->parser->parse('blog_template', $data);</code> <p>The first parameter contains the name of the <a href="../general/views.html">view file</a> (in this example the file would be called blog_template.php), -and the second parameter contains an associative array of data to be replaced in the template. In the above example, the +and the second parameter contains an associative array of data to be replaced in the template. In the above example, the template would contain two variables: {blog_title} and {blog_heading}</p> -<p>There is no need to "echo" or do something with the data returned by <dfn>$this->parser->parse()</dfn>. It is automatically -passed to the output class to be sent to the browser. However, if you do want the data returned instead of sent to the output class you can +<p>There is no need to "echo" or do something with the data returned by <dfn>$this->parser->parse()</dfn>. It is automatically +passed to the output class to be sent to the browser. However, if you do want the data returned instead of sent to the output class you can pass TRUE (boolean) to the third parameter:</p> <code>$string = $this->parser->parse('blog_template', $data, TRUE);</code> @@ -130,8 +130,8 @@ pass TRUE (boolean) to the third parameter:</p> <h2>Variable Pairs</h2> -<p>The above example code allows simple variables to be replaced. What if you would like an entire block of variables to be -repeated, with each iteration containing new values? Consider the template example we showed at the top of the page:</p> +<p>The above example code allows simple variables to be replaced. What if you would like an entire block of variables to be +repeated, with each iteration containing new values? Consider the template example we showed at the top of the page:</p> <code><html><br /> <head><br /> |