From 69116ed94140cb7eca7d3ae1068c045d267e3d6b Mon Sep 17 00:00:00 2001 From: purwandi Date: Fri, 7 Oct 2011 15:27:45 +0700 Subject: Fix CodeIgniter URLs on User Guide --- user_guide_src/source/general/urls.rst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/user_guide_src/source/general/urls.rst b/user_guide_src/source/general/urls.rst index db1ffe565..211537675 100644 --- a/user_guide_src/source/general/urls.rst +++ b/user_guide_src/source/general/urls.rst @@ -28,8 +28,7 @@ approach, usually represent:: #. The third, and any additional segments, represent the ID and any variables that will be passed to the controller. -The :doc::doc:`URI Class <../libraries/uri>` and the `URL -Helper <../helpers/url_helper>` contain functions that make it +The :doc:`URI Class <../libraries/uri>` and the :doc:`URL Helper <../helpers/url_helper>` contain functions that make it easy to work with your URI data. In addition, your URLs can be remapped using the :doc:`URI Routing ` feature for more flexibility. @@ -56,13 +55,13 @@ images, and robots.txt is treated as a request for your index.php file. Adding a URL Suffix =================== -In your config/config.php file you can specify a suffix that will be +In your **config/config.php** file you can specify a suffix that will be added to all URLs generated by CodeIgniter. For example, if a URL is this:: example.com/index.php/products/view/shoes -You can optionally add a suffix, like .html, making the page appear to +You can optionally add a suffix, like **.html,** making the page appear to be of a certain type:: example.com/index.php/products/view/shoes.html @@ -75,7 +74,7 @@ In some cases you might prefer to use query strings URLs:: index.php?c=products&m=view&id=345 CodeIgniter optionally supports this capability, which can be enabled in -your application/config.php file. If you open your config file you'll +your **application/config.php** file. If you open your config file you'll see these items:: $config['enable_query_strings'] = FALSE; @@ -88,7 +87,7 @@ active. Your controllers and functions will then be accessible using the index.php?c=controller&m=method -..note:: If you are using query strings you will have to build +.. note:: If you are using query strings you will have to build your own URLs, rather than utilizing the URL helpers (and other helpers that generate URLs, like some of the form helpers) as these are designed to work with segment based URLs. -- cgit v1.2.3-24-g4f1b From 02df61fd8bb71ee1a19b32db24d01017ddf65131 Mon Sep 17 00:00:00 2001 From: purwandi Date: Fri, 7 Oct 2011 15:33:40 +0700 Subject: Fix Controllers on User Guide --- user_guide_src/source/general/controllers.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/user_guide_src/source/general/controllers.rst b/user_guide_src/source/general/controllers.rst index c3c19cc62..6e5079419 100644 --- a/user_guide_src/source/general/controllers.rst +++ b/user_guide_src/source/general/controllers.rst @@ -10,8 +10,8 @@ HTTP requests should be handled. What is a Controller? ===================== -A Controller is simply a class file that is named in a way that can be -associated with a URI. +**A Controller is simply a class file that is named in a way that can be +associated with a URI.** Consider this URI:: @@ -136,7 +136,7 @@ Defining a Default Controller CodeIgniter can be told to load a default controller when a URI is not present, as will be the case when only your site root URL is requested. -To specify a default controller, open your application/config/routes.php +To specify a default controller, open your **application/config/routes.php** file and set this variable:: $route['default_controller'] = 'Blog'; @@ -199,8 +199,7 @@ Processing Output CodeIgniter has an output class that takes care of sending your final rendered data to the web browser automatically. More information on this -can be found in the :doc::doc:`Views ` and `Output -class <../libraries/output>` pages. In some cases, however, you +can be found in the :doc:`Views ` and :doc:`Output class <../libraries/output>` pages. In some cases, however, you might want to post-process the finalized data in some way and send it to the browser yourself. CodeIgniter permits you to add a function named _output() to your controller that will receive the finalized output -- cgit v1.2.3-24-g4f1b From 5ebf9d1d29f73c5b941fc7bb2e0a2cdcb347f74e Mon Sep 17 00:00:00 2001 From: purwandi Date: Fri, 7 Oct 2011 16:09:13 +0700 Subject: Fix Views on User Guide --- user_guide_src/source/general/views.rst | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/user_guide_src/source/general/views.rst b/user_guide_src/source/general/views.rst index 7d0accafd..dc65f6c4f 100644 --- a/user_guide_src/source/general/views.rst +++ b/user_guide_src/source/general/views.rst @@ -24,7 +24,7 @@ in it:: - My Blog + My Blog

Welcome to my Blog!

@@ -141,7 +141,7 @@ to the array keys in your data:: - <?php echo $title;?> + <?php echo $title;?>

@@ -180,27 +180,27 @@ Now open your view file and create a loop:: - <?php echo $title;?> + <?php echo $title;?> -

- -

My Todo List

- -
    - - -
  • +

    + +

    My Todo List

    - -
+
    + + +
  • + + +
.. note:: You'll notice that in the example above we are using PHP's alternative syntax. If you are not familiar with it you can read about - it `here `. + it :doc:`here `. Returning views as data ======================= -- cgit v1.2.3-24-g4f1b