diff options
author | Andrey Andreev <narf@devilix.net> | 2015-01-12 16:23:26 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-01-12 16:23:26 +0100 |
commit | 45a8afaabc6d09ad59bbb3c89a6cdfe8cbc3312c (patch) | |
tree | 7ca4207099f9225b5ef74b31f48627a282e7fdf2 /user_guide_src/source/tutorial | |
parent | cd94dd7e1d8969658810ccc4158a75d2936d0a44 (diff) | |
parent | 934d6d9797f4dadd4e4d05b12bc4d7309fedb6c3 (diff) |
Merge branch 'develop' into feature/session
Diffstat (limited to 'user_guide_src/source/tutorial')
-rw-r--r-- | user_guide_src/source/tutorial/create_news_items.rst | 2 | ||||
-rw-r--r-- | user_guide_src/source/tutorial/news_section.rst | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/user_guide_src/source/tutorial/create_news_items.rst b/user_guide_src/source/tutorial/create_news_items.rst index ad355b33d..1f4a96dd3 100644 --- a/user_guide_src/source/tutorial/create_news_items.rst +++ b/user_guide_src/source/tutorial/create_news_items.rst @@ -18,7 +18,7 @@ application/views/news/create.php. :: - <h2>Create a news item</h2> + <h2><?php echo $title ?></h2> <?php echo validation_errors(); ?> diff --git a/user_guide_src/source/tutorial/news_section.rst b/user_guide_src/source/tutorial/news_section.rst index ad9ed41d3..80938de32 100644 --- a/user_guide_src/source/tutorial/news_section.rst +++ b/user_guide_src/source/tutorial/news_section.rst @@ -143,13 +143,15 @@ and add the next piece of code. :: + <h2><?php echo $title ?></h2> + <?php foreach ($news as $news_item): ?> - <h2><?php echo $news_item['title'] ?></h2> + <h3><?php echo $news_item['title'] ?></h3> <div class="main"> <?php echo $news_item['text'] ?> </div> - <p><a href="<?php echo $news_item['slug'] ?>">View article</a></p> + <p><a href="news/<?php echo $news_item['slug'] ?>">View article</a></p> <?php endforeach ?> @@ -196,7 +198,7 @@ The only things left to do is create the corresponding view at Routing ------- -Because of the wildcard routing rule created earlier, you need need an +Because of the wildcard routing rule created earlier, you need an extra route to view the controller that you just made. Modify your routing file (application/config/routes.php) so it looks as follows. This makes sure the requests reaches the news controller instead of |