-
Book Overview & Buying
-
Table Of Contents
CodeIgniter Web Application Blueprints
By :
There are six view files in this application, and these are as follows:
discussions/view.php: This displays all active discussions
discussions/new.php: This displays a form to the user, allowing them to create a discussion
comments/view.php: This displays all active comments within a discussion
nav/top_nav.php: This contains the top navigation links
admin/login.php: This displays a login form for the user; don't forget to add the signin.css script, which you can find later in this chapter
common/login_header.php: The views/admin/login.php view requires different resources from the rest of the application, which is supported by this header
The discussions/view.php view file displays a list of all active discussions as well as sorting options.
Create the /path/to/codeigniter/views/discussions/view.php file and add the following code to it:
SORT: <?php echo anchor('discussions/index/sort/age/' . (($dir == 'ASC') ? 'DESC' : 'ASC'),'Newest '
. (($dir ==...