@@ -29,8 +29,9 @@ Helpers are typically stored in your **system/Helpers**, or
2929specified helper is not located there CI will instead look in your
3030global **system/Helpers ** directory.
3131
32+ ****************
3233Loading a Helper
33- ================
34+ ****************
3435
3536.. note :: The URL helper is always loaded so you do not need to load it yourself.
3637
@@ -50,15 +51,15 @@ For example, to load the **Cookie Helper** file, which is named
5051 don't try to assign it to a variable. Just use it as shown.
5152
5253Loading Multiple Helpers
53- ------------------------
54+ ========================
5455
5556If you need to load more than one helper at a time, you can pass
5657an array of file names in and all of them will be loaded:
5758
5859.. literalinclude :: helpers/003.php
5960
6061Loading in a Controller
61- -----------------------
62+ =======================
6263
6364A helper can be loaded anywhere within your controller methods (or
6465even within your View files, although that's not a good practice), as
@@ -75,7 +76,7 @@ property in Controller instead. See :ref:`Controllers <controllers-helpers>`.
7576.. _helpers-loading-from-non-standard-locations :
7677
7778Loading from Non-standard Locations
78- -----------------------------------
79+ ===================================
7980
8081Helpers can be loaded from directories outside of **app/Helpers ** and
8182**system/Helpers **, as long as that path can be found through a namespace that
@@ -100,8 +101,9 @@ You can also use the following way:
100101.. note :: The functions within files loaded this way are not truly namespaced.
101102 The namespace is simply used as a convenient way to locate the files.
102103
104+ **************
103105Using a Helper
104- ==============
106+ **************
105107
106108Once you've loaded the Helper File containing the function you intend to
107109use, you'll call it the way you would a standard PHP function.
@@ -114,8 +116,9 @@ your view files you would do this:
114116Where ``Click Here `` is the name of the link, and ``blog/comments `` is the
115117URI to the controller/method you wish to link to.
116118
119+ *******************
117120"Extending" Helpers
118- ===================
121+ *******************
119122
120123To "extend" Helpers, create a file in your **app/Helpers/ ** folder
121124with an identical name to the existing Helper.
@@ -145,8 +148,9 @@ is as follows:
1451482. {namespace}/Helpers - All namespaces are looped through in the order they are defined.
1461493. system/Helpers - The base file is loaded last
147150
151+ *********
148152Now What?
149- =========
153+ *********
150154
151155In the Table of Contents, you'll find a list of all the available :doc: `Helpers <../helpers/index >`.
152156Browse each one to see what they do.
0 commit comments