From ff845f94cc8876bc6c23c2f55b695bc569038512 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Thu, 26 Jun 2008 17:05:55 +0000 Subject: changed your-site.com to example.com doc-wide --- user_guide/general/controllers.html | 14 +++++++------- user_guide/general/routing.html | 10 +++++----- user_guide/general/scaffolding.html | 4 ++-- user_guide/general/urls.html | 10 +++++----- user_guide/general/views.html | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) (limited to 'user_guide/general') diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index 034f1b23c..6f568d49e 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -82,7 +82,7 @@ Controllers

Consider this URI:

-www.your-site.com/index.php/blog/ +example.com/index.php/blog/

In the above example, CodeIgniter would attempt to find a controller named blog.php and load it.

@@ -112,7 +112,7 @@ class Blog extends Controller {

Now visit the your site using a URL similar to this:

-www.your-site.com/index.php/blog/ +example.com/index.php/blog/

If you did it right, you should see Hello World!.

@@ -142,7 +142,7 @@ class blog extends Controller {

In the above example the function name is index(). The "index" function is always loaded by default if the second segment of the URI is empty. Another way to show your "Hello World" message would be this:

-www.your-site.com/index.php/blog/index/ +example.com/index.php/blog/index/

The second segment of the URI determines which function in the controller gets called.

@@ -168,7 +168,7 @@ class Blog extends Controller {

Now load the following URL to see the comment function:

-www.your-site.com/index.php/blog/comments/ +example.com/index.php/blog/comments/

You should see your new message.

@@ -179,7 +179,7 @@ class Blog extends Controller {

For example, lets say you have a URI like this:

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

Your function will be passed URI segments 3 and 4 ("sandals" and "123"):

@@ -287,7 +287,7 @@ function _utility()

Trying to access it via the URL, like this, will not work:

-www.your-site.com/index.php/blog/_utility/ +example.com/index.php/blog/_utility/ @@ -305,7 +305,7 @@ located here:

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

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

Each of your sub-folders may contain a default controller which will be called if the URL contains only the sub-folder. Simply name your default controller as specified in your diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html index b282e18d8..f3e7995a8 100644 --- a/user_guide/general/routing.html +++ b/user_guide/general/routing.html @@ -60,7 +60,7 @@ URI Routing

Typically there is a one-to-one relationship between a URL string and its corresponding controller class/method. The segments in a URI normally follow this pattern:

-www.your-site.com/class/function/id/ +example.com/class/function/id/

In some instances, however, you may want to remap this relationship so that a different class/function can be called instead of the one corresponding to the URL.

@@ -68,10 +68,10 @@ instead of the one corresponding to the URL.

For example, lets say you want your URLs to have this prototype:

-www.your-site.com/product/1/
-www.your-site.com/product/2/
-www.your-site.com/product/3/
-www.your-site.com/product/4/ +example.com/product/1/
+example.com/product/2/
+example.com/product/3/
+example.com/product/4/

Normally the second segment of the URL is reserved for the function name, but in the example above it instead has a product ID. diff --git a/user_guide/general/scaffolding.html b/user_guide/general/scaffolding.html index 417cb1005..14eed1718 100644 --- a/user_guide/general/scaffolding.html +++ b/user_guide/general/scaffolding.html @@ -113,12 +113,12 @@ class Blog extends Controller {

Once you've initialized scaffolding, you will access it with this URL prototype:

-www.your-site.com/index.php/class/secret_word/ +example.com/index.php/class/secret_word/

For example, using a controller named Blog, and abracadabra as the secret word, you would access scaffolding like this:

-www.your-site.com/index.php/blog/abracadabra/ +example.com/index.php/blog/abracadabra/

The scaffolding interface should be self-explanatory. You can add, edit or delete records.

diff --git a/user_guide/general/urls.html b/user_guide/general/urls.html index 9230f98c8..bbfd009ce 100644 --- a/user_guide/general/urls.html +++ b/user_guide/general/urls.html @@ -61,7 +61,7 @@ URLS

By default, URLs in CodeIgniter are designed to be search-engine and human friendly. Rather than using the standard "query string" approach to URLs that is synonymous with dynamic systems, CodeIgniter uses a segment-based approach:

-www.your-site.com/news/article/my_article +example.com/news/article/my_article

Note: Query string URLs can be optionally enabled, as described below.

@@ -69,7 +69,7 @@ approach to URLs that is synonymous with dynamic systems, CodeIgniter uses a The segments in the URL, in following with the Model-View-Controller approach, usually represent:

-www.your-site.com/class/function/ID +example.com/class/function/ID
  1. The first segment represents the controller class that should be invoked.
  2. @@ -87,7 +87,7 @@ contain functions that make it easy to work with your URI data. In addition, yo

    By default, the index.php file will be included in your URLs:

    -www.your-site.com/index.php/news/article/my_article +example.com/index.php/news/article/my_article

    You can easily remove this file by using a .htaccess file with some simple rules. Here is an example of such a file, using the "negative" method in which everything is redirected except the specified items:

    @@ -105,11 +105,11 @@ a request for your index.php file.

    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:

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

    You can optionally add a suffix, like .html, making the page appear to be of a certain type:

    -www.your-site.com/index.php/products/view/shoes.html +example.com/index.php/products/view/shoes.html

    Enabling Query Strings

    diff --git a/user_guide/general/views.html b/user_guide/general/views.html index 3417f55b4..8ccc8d471 100644 --- a/user_guide/general/views.html +++ b/user_guide/general/views.html @@ -111,7 +111,7 @@ class Blog extends Controller {

    If you visit the your site using the URL you did earlier you should see your new view. The URL was similar to this:

    -www.your-site.com/index.php/blog/ +example.com/index.php/blog/

    Loading multiple views

    CodeIgniter will intelligently handle multiple calls to $this->load->view from within a controller. If more then one call happens they will be appended together. For example, you may wish to have a header view, a menu view, a content view, and a footer view. That might look something like this:

    -- cgit v1.2.3-24-g4f1b