diff options
author | Master Yoda <jim_parry@bcit.ca> | 2015-03-25 10:36:31 +0100 |
---|---|---|
committer | Master Yoda <jim_parry@bcit.ca> | 2015-03-25 10:36:31 +0100 |
commit | bd2a7e4062fd97017c5b16beddc15b0c7fc38210 (patch) | |
tree | 723bcf3f85158037e928123fcbeef05384252354 /user_guide_src/source/tutorial | |
parent | 7ad59209ad2443b8ea113222e3cab38ab305da92 (diff) |
Fixed user guide internal & external links to resolve problems reported by sphinx "make linkcheck"
Signed-off-by:Master Yoda <jim_parry@bcit.ca>
Diffstat (limited to 'user_guide_src/source/tutorial')
-rw-r--r-- | user_guide_src/source/tutorial/create_news_items.rst | 22 | ||||
-rw-r--r-- | user_guide_src/source/tutorial/index.rst | 8 | ||||
-rw-r--r-- | user_guide_src/source/tutorial/news_section.rst | 14 | ||||
-rw-r--r-- | user_guide_src/source/tutorial/static_pages.rst | 8 |
4 files changed, 26 insertions, 26 deletions
diff --git a/user_guide_src/source/tutorial/create_news_items.rst b/user_guide_src/source/tutorial/create_news_items.rst index 461584723..71d2080af 100644 --- a/user_guide_src/source/tutorial/create_news_items.rst +++ b/user_guide_src/source/tutorial/create_news_items.rst @@ -37,16 +37,16 @@ application/views/news/create.php. There are only two things here that probably look unfamiliar to you: the form_open() function and the validation_errors() function. -The first function is provided by the `form -helper <../helpers/form_helper.html>`_ and renders the form element and -adds extra functionality, like adding a hidden `CSRF prevention -field <../libraries/security.html>`_. The latter is used to report +The first function is provided by the :doc:`form +helper <../helpers/form_helper>` and renders the form element and +adds extra functionality, like adding a hidden :doc:`CSRF prevention +field <../libraries/security>`. The latter is used to report errors related to form validation. Go back to your news controller. You're going to do two things here, check whether the form was submitted and whether the submitted data -passed the validation rules. You'll use the `form -validation <../libraries/form_validation.html>`_ library to do this. +passed the validation rules. You'll use the :doc:`form +validation <../libraries/form_validation>` library to do this. :: @@ -81,8 +81,8 @@ the name of the input field, the name to be used in error messages, and the rule. In this case the title and text fields are required. CodeIgniter has a powerful form validation library as demonstrated -above. You can read `more about this library -here <../libraries/form_validation.html>`_. +above. You can read :doc:`more about this library +here <../libraries/form_validation>`. Continuing down, you can see a condition that checks whether the form validation ran successfully. If it did not, the form is displayed, if it @@ -117,7 +117,7 @@ the model created earlier and add the following: This new method takes care of inserting the news item into the database. The third line contains a new function, url\_title(). This function - -provided by the `URL helper <../helpers/url_helper.html>`_ - strips down +provided by the :doc:`URL helper <../helpers/url_helper>` - strips down the string you pass it, replacing all spaces by dashes (-) and makes sure everything is in lowercase characters. This leaves you with a nice slug, perfect for creating URIs. @@ -125,8 +125,8 @@ slug, perfect for creating URIs. Let's continue with preparing the record that is going to be inserted later, inside the $data array. Each element corresponds with a column in the database table created earlier. You might notice a new method here, -namely the post() method from the `input -library <../libraries/input.html>`_. This method makes sure the data is +namely the post() method from the :doc:`input +library <../libraries/input>`. This method makes sure the data is sanitized, protecting you from nasty attacks from others. The input library is loaded by default. At last, you insert our $data array into our database. diff --git a/user_guide_src/source/tutorial/index.rst b/user_guide_src/source/tutorial/index.rst index b1ab331d1..91f99c7cd 100644 --- a/user_guide_src/source/tutorial/index.rst +++ b/user_guide_src/source/tutorial/index.rst @@ -24,13 +24,13 @@ through the following pages: - Introduction, this page, which gives you an overview of what to expect. -- `Static pages <static_pages.html>`_, which will teach you the basics +- :doc:`Static pages <static_pages>`, which will teach you the basics of controllers, views and routing. -- `News section <news_section.html>`_, where you'll start using models +- :doc:`News section <news_section>`, where you'll start using models and will be doing some basic database operations. -- `Create news items <create_news_items.html>`_, which will introduce +- :doc:`Create news items <create_news_items>`, which will introduce more advanced database operations and form validation. -- `Conclusion <conclusion.html>`_, which will give you some pointers on +- :doc:`Conclusion <conclusion>`, which will give you some pointers on further reading and other resources. Enjoy your exploration of the CodeIgniter framework. diff --git a/user_guide_src/source/tutorial/news_section.rst b/user_guide_src/source/tutorial/news_section.rst index f436b2510..d8ebac4a3 100644 --- a/user_guide_src/source/tutorial/news_section.rst +++ b/user_guide_src/source/tutorial/news_section.rst @@ -18,7 +18,7 @@ database or other data stores. They represent your data. Open up the application/models directory and create a new file called News_model.php and add the following code. Make sure you've configured your database properly as described -`here <../database/configuration.html>`_. +:doc:`here <../database/configuration>`. :: @@ -53,10 +53,10 @@ seed records. Now that the database and a model have been set up, you'll need a method to get all of our posts from our database. To do this, the database -abstraction layer that is included with CodeIgniter — `Active -Record <../database/query_builder.html>`_ — is used. This makes it -possible to write your 'queries' once and make them work on `all -supported database systems <../general/requirements.html>`_. Add the +abstraction layer that is included with CodeIgniter — +:doc:`Query Builder <../database/query_builder>` — is used. This makes it +possible to write your 'queries' once and make them work on :doc:`all +supported database systems <../general/requirements>`. Add the following code to your model. :: @@ -157,8 +157,8 @@ and add the next piece of code. Here, each news item is looped and displayed to the user. You can see we wrote our template in PHP mixed with HTML. If you prefer to use a -template language, you can use CodeIgniter's `Template -Parser <../libraries/parser>`_ class or a third party parser. +template language, you can use CodeIgniter's :doc:`Template +Parser <../libraries/parser>` class or a third party parser. The news overview page is now done, but a page to display individual news items is still absent. The model created earlier is made in such diff --git a/user_guide_src/source/tutorial/static_pages.rst b/user_guide_src/source/tutorial/static_pages.rst index 53f286473..210d9f8d6 100644 --- a/user_guide_src/source/tutorial/static_pages.rst +++ b/user_guide_src/source/tutorial/static_pages.rst @@ -3,7 +3,7 @@ Static pages ############ **Note:** This tutorial assumes you've downloaded CodeIgniter and -`installed the framework <../installation/index.html>`_ in your +:doc:`installed the framework <../installation/index>` in your development environment. The first thing you're going to do is set up a **controller** to handle @@ -12,14 +12,14 @@ It is the glue of your web application. For example, when a call is made to: - http://example.com/news/latest/10 + http://example.com/news/latest/10 We might imagine that there is a controller named "news". The method being called on news would be "latest". The news method's job could be to grab 10 news items, and render them on the page. Very often in MVC, you'll see URL patterns that match: - http://example.com/[controller-class]/[controller-method]/[arguments] + http://example.com/[controller-class]/[controller-method]/[arguments] As URL schemes become more complex, this may change. But for now, this is all we will need to know. @@ -159,7 +159,7 @@ match, and calls the appropriate controller and method, possibly with arguments. More information about routing can be found in the URI Routing -`documentation <../general/routing.html>`_. +:doc:`documentation <../general/routing>`. Here, the second rule in the $routes array matches **any** request using the wildcard string (:any). and passes the parameter to the ``view()`` |