summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
authorJames L Parry <jim_parry@bcit.ca>2014-11-24 19:59:09 +0100
committerJames L Parry <jim_parry@bcit.ca>2014-11-24 19:59:09 +0100
commit307663f2c05f5800c4e17fe8eff9b329bbcb8fa8 (patch)
tree1532d0738500a88f90a02de1c5c8818460ba478c /user_guide_src/source
parentdef2c8f1c39e7543d02411ee7228489c758ebb8e (diff)
Fixed the convention violations.
Changed the section/subsection treatment Verified sphinx build. Signed-off-by:James L Parry <jim_parry@bcit.ca>
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/libraries/parser.rst21
1 files changed, 10 insertions, 11 deletions
diff --git a/user_guide_src/source/libraries/parser.rst b/user_guide_src/source/libraries/parser.rst
index 7c690ac2a..e7c7e3abd 100644
--- a/user_guide_src/source/libraries/parser.rst
+++ b/user_guide_src/source/libraries/parser.rst
@@ -45,9 +45,12 @@ representations that allow you to eliminate PHP from your templates
<div class="custom-index container"></div>
-**********************
+*******************************
+Using the Template Parser Class
+*******************************
+
Initializing the Class
-**********************
+======================
Like most other classes in CodeIgniter, the Parser class is initialized
in your controller using the $this->load->library function::
@@ -57,9 +60,8 @@ in your controller using the $this->load->library function::
Once loaded, the Parser library object will be available using:
$this->parser
-*****************
Parsing templates
-*****************
+=================
You can use the ``parse()`` method to parse (or render) simple templates,
like this::
@@ -85,9 +87,8 @@ third parameter::
$string = $this->parser->parse('blog_template', $data, TRUE);
-**************
Variable Pairs
-**************
+==============
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
@@ -150,9 +151,8 @@ function::
$this->parser->parse('blog_template', $data);
-***************************
-Template Parser Usage Notes
-***************************
+Usage Notes
+===========
If you include substitution parameters that are not referenced in your
template, they are ignored::
@@ -218,9 +218,8 @@ may not be as expected::
Result: Hello, John Doe (Mr Mr )
-**************
View Fragments
-**************
+==============
You do not have to use variable pairs to get the effect of iteration in
your views. It is possible to use a view fragment for what would be inside