Skip to content

Commit 4b5fd2f

Browse files
committed
docs: fix section titles and its marks
1 parent cf0d2bb commit 4b5fd2f

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

user_guide_src/source/tutorial/create_news_items.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Create news items
1+
Create News Items
22
#################
33

44
You now know how you can read data from a database using CodeIgniter, but
@@ -7,7 +7,7 @@ you'll expand your news controller and model created earlier to include
77
this functionality.
88

99
Enable CSRF Filter
10-
------------------
10+
******************
1111

1212
Before creating a form, let's enable the CSRF protection.
1313

@@ -22,8 +22,8 @@ You can read more about the CSRF protection in :doc:`Security </libraries/securi
2222
because auto-routing permits any HTTP method to access a controller.
2323
Accessing the controller with a method you don't expect could bypass the filter.
2424

25-
Create a form
26-
-------------
25+
Create a Form
26+
*************
2727

2828
To input data into the database, you need to create a form where you can
2929
input the information to be stored. This means you'll be needing a form
@@ -96,7 +96,7 @@ This could be as simple as:
9696
News item created successfully.
9797

9898
Model Updating
99-
-------------------------------------------------------
99+
**************
100100

101101
The only thing that remains is ensuring that your model is set up
102102
to allow data to be saved properly. The ``save()`` method that was
@@ -119,7 +119,7 @@ This helps protect against Mass Assignment Vulnerabilities. If your model is
119119
handling your timestamps, you would also leave those out.
120120

121121
Routing
122-
-------------------------------------------------------
122+
*******
123123

124124
Before you can start adding news items into your CodeIgniter application
125125
you have to add an extra rule to **app/Config/Routes.php** file. Make sure your
@@ -144,7 +144,7 @@ Add some news and check out the different pages you made.
144144
:width: 45%
145145

146146
Congratulations
147-
-------------------------------------------------------
147+
***************
148148

149149
You just completed your first CodeIgniter4 application!
150150

user_guide_src/source/tutorial/news_section.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
News section
2-
###############################################################################
1+
News Section
2+
############
33

44
In the last section, we went over some basic concepts of the framework
55
by writing a class that references static pages. We cleaned up the URI by
66
adding custom routing rules. Now it's time to introduce dynamic content
77
and start using a database.
88

9-
Create a database to work with
10-
-------------------------------------------------------
9+
Create a Database to Work with
10+
******************************
1111

1212
The CodeIgniter installation assumes that you have set up an appropriate
1313
database, as outlined in the :doc:`requirements </intro/requirements>`.
@@ -47,8 +47,8 @@ The seed records might be something like:
4747
(2,'Say it isn\'t so!','say-it-isnt-so','Scientists conclude that some programmers have a sense of humor.'),
4848
(3,'Caffeination, Yes!','caffeination-yes','World\'s largest coffee shop open onsite nested coffee shop for staff only.');
4949

50-
Connect to your database
51-
-------------------------------------------------------
50+
Connect to Your Database
51+
************************
5252

5353
The local configuration file, ``.env``, that you created when you installed
5454
CodeIgniter, should have the database property settings uncommented and
@@ -63,8 +63,8 @@ your database properly as described :doc:`here <../database/configuration>`.
6363
database.default.password = root
6464
database.default.DBDriver = MySQLi
6565

66-
Setting up your model
67-
-------------------------------------------------------
66+
Setting up Your Model
67+
*********************
6868

6969
Instead of writing database operations right in the controller, queries
7070
should be placed in a model, so they can easily be reused later. Models
@@ -106,8 +106,8 @@ that use the Query Builder to run their commands on the current table, and
106106
returning an array of results in the format of your choice. In this example,
107107
``findAll()`` returns an array of array.
108108

109-
Display the news
110-
-------------------------------------------------------
109+
Display the News
110+
****************
111111

112112
Now that the queries are written, the model should be tied to the views
113113
that are going to display the news items to the user. This could be done
@@ -174,7 +174,7 @@ The only thing left to do is create the corresponding view at
174174
.. literalinclude:: news_section/007.php
175175

176176
Routing
177-
-------------------------------------------------------
177+
*******
178178

179179
Because of the wildcard routing rule created earlier, you need an extra
180180
route to view the controller that you just made. Modify your routing file

user_guide_src/source/tutorial/static_pages.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Static pages
2-
###############################################################################
1+
Static Pages
2+
############
33

44
.. note:: This tutorial assumes you've downloaded CodeIgniter and
55
:doc:`installed the framework <../installation/index>` in your
@@ -27,8 +27,8 @@ you'll see URL patterns that match:
2727
As URL schemes become more complex, this may change. But for now, this
2828
is all we will need to know.
2929

30-
Let's make our first controller
31-
-------------------------------------------------------
30+
Let's Make our First Controller
31+
*******************************
3232

3333
Create a file at **app/Controllers/Pages.php** with the following
3434
code.
@@ -85,8 +85,8 @@ includes the following code::
8585
function. It's a global function provided by CodeIgniter to help prevent
8686
XSS attacks. You can read more about it :doc:`here </general/common_functions>`.
8787

88-
Adding logic to the controller
89-
-------------------------------------------------------
88+
Adding Logic to the Controller
89+
******************************
9090

9191
Earlier you set up a controller with a ``view()`` method. The method
9292
accepts one parameter, which is the name of the page to be loaded. The
@@ -131,7 +131,7 @@ view.
131131
:doc:`here </outgoing/views>`.
132132

133133
Running the App
134-
-------------------------------------------------------
134+
***************
135135

136136
Ready to test? You cannot run the app using PHP's built-in server,
137137
since it will not properly process the ``.htaccess`` rules that are provided in
@@ -177,7 +177,7 @@ controller you made above produces...
177177
+---------------------------------+-----------------------------------------------------------------+
178178

179179
Routing
180-
-------------------------------------------------------
180+
*******
181181

182182
The controller is now functioning!
183183

0 commit comments

Comments
 (0)