From b071bb5a92aade551345a495fb13f5678f3978d0 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 26 Aug 2006 19:28:37 +0000 Subject: --- user_guide/general/changelog.html | 16 ++++++++++++---- user_guide/general/controllers.html | 20 ++++++++++++++++++++ user_guide/general/routing.html | 2 +- user_guide/helpers/form_helper.html | 10 +++++----- user_guide/helpers/url_helper.html | 6 ++++-- user_guide/libraries/database/active_record.html | 2 +- 6 files changed, 43 insertions(+), 13 deletions(-) (limited to 'user_guide') diff --git a/user_guide/general/changelog.html b/user_guide/general/changelog.html index 5f3b86904..5721bc866 100644 --- a/user_guide/general/changelog.html +++ b/user_guide/general/changelog.html @@ -69,20 +69,28 @@ Change Log diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index 648298eb0..b45b5aef7 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -71,6 +71,7 @@ Controllers
  • Functions
  • Private Functions
  • Defining a Default Controller
  • +
  • Organizing Controllers into Sub-folders
  • Class Constructors
  • Reserved Function Names
  • @@ -204,6 +205,25 @@ your application/config/routes.php file and set this variable:

    specifying any URI segments you'll see your Hello World message by default.

    + +

    Organizing Your Controllers into Sub-folders

    + +

    If you are building a large application you might find it convenient to organize your controllers into sub-folders. Code Igniter permits you to do this.

    + +

    Simply create folders within your application/controllers directory and place your controller classes within them.

    + +

    Note:  When using this feature the first segment or your URI must specify the folder. For example, lets say you have a controller +located here:

    + +application/controllers/products/shoes.php + +

    To call the above controller your URI will look something like this:

    + +www.your-site.com/index.php/products/shoes/123 + +

    Code Igniter also permits you to remap your URIs using its URI Routing feature. + +

    Class Constructors

    diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html index 977698b9f..e5dac6808 100644 --- a/user_guide/general/routing.html +++ b/user_guide/general/routing.html @@ -138,7 +138,7 @@ Higher routes will always take precedence over lower ones.

    A typical RegEx route might look something like this:

    -$route['products\/([a-z]+)\/(\d+)'] = "$1/id_$2"; +$route['products/([a-z]+)/(\d+)'] = "$1/id_$2";

    In the above example, a URI similar to products/shirts/123 would instead call the shirts controller class and the id_123 function.

    diff --git a/user_guide/helpers/form_helper.html b/user_guide/helpers/form_helper.html index 8593f81d9..f38d4ada1 100644 --- a/user_guide/helpers/form_helper.html +++ b/user_guide/helpers/form_helper.html @@ -208,7 +208,7 @@ value you wish to be selected. Example: $options = array(
                      'small'  => 'Small Shirt',
                      'med'    => 'Medium Shirt',
    -                  large'   => 'Large Shirt',
    +                  'large'   => 'Large Shirt',
                      'xlarge' => 'Extra Large Shirt',
                    );

    @@ -217,10 +217,10 @@ echo form_dropdown('shirts', $options, 'large');
    // Would produce:

    <select name="shirts">
    -<option value="small">Small Shirt
    -<option value="med">Medium Shirt
    -<option value="large" selected>Large Shirt
    -<option value="xlarge">Extra Large Shirt
    +<option value="small">Small Shirt</option>
    +<option value="med">Medium Shirt</option>
    +<option value="large" selected>Large Shirt</option>
    +<option value="xlarge">Extra Large Shirt</option>
    </select>
    diff --git a/user_guide/helpers/url_helper.html b/user_guide/helpers/url_helper.html index a8f5c14d6..2b5b354cc 100644 --- a/user_guide/helpers/url_helper.html +++ b/user_guide/helpers/url_helper.html @@ -117,8 +117,10 @@ echo site_url($segments); anchor(uri segments, text, attributes)

    The first parameter can contain any segments you wish appended to the URL. As with the site_url() function above, -segments can be a string or an array. Note: Do not include the base URL. It will be built as specified in your config file. Include -only the URI segments you wish appended to the URL.

    +segments can be a string or an array.

    + +

    Note:  If you are building links that are internal to your application do not include the base URL (http://...). This +will be added automatically from the information specified in your config file. Include only the URI segments you wish appended to the URL.

    The second segment is the text you would like the link to say. If you leave it blank, the URL will be used.

    diff --git a/user_guide/libraries/database/active_record.html b/user_guide/libraries/database/active_record.html index 8fc3b8131..6e5d6126a 100644 --- a/user_guide/libraries/database/active_record.html +++ b/user_guide/libraries/database/active_record.html @@ -557,7 +557,7 @@ You can optionally pass this information directly into the update function as a

    Generates a delete SQL string and runs the query.

    -$this->db->delete('mytable', array('id', $id)); +$this->db->delete('mytable', array('id' => $id));

    // Produces:
    // DELETE FROM mytable
    -- cgit v1.2.3-24-g4f1b