Professional CodeIgniter

(singke) #1

Chapter 8: Last-Minute Upgrades


242


Creating the Administrative Views


For the page manager, you ’ ll need three views:

A home page, where you list all the pages available in the Pages table

A Create page, where you allow a new page to be added to the Pages table

An Edit page, where you allow an existing page to be updated

In other words, the views for this tool are pretty much the same as the views for all the other tools that
you ’ ve built so far.

Before you jump into all those changes, it ’ s best if you update the admin_home and admin_header
views. The admin_header view contains all the navigation for the admin tools:

< div id=’globalnav’ >
< ul >
< li > < ?php echo anchor(“admin/dashboard/index”,”dashboard”);? > < /li >
< li > < ?php echo anchor(“admin/categories/”,”categories”);? > < /li >
< li > < ?php echo anchor(“admin/pages/”, “pages”);? > < /li >
< li > < ?php echo anchor(“admin/products/”, “products”);? > < /li >
< li > < ?php echo anchor(“admin/colors/”, “colors”);? > < /li >
< li > < ?php echo anchor(“admin/sizes/”, “sizes”);? > < /li >
< li > < ?php echo anchor(“admin/admins/”, “users”);? >
< /li > < li > < ?php echo anchor(“admin/dashboard/logout/”, “logout”);? > < /li >
< /ul >
< /div >

The admin_home view contains basic information about each module.

< ul >
< li > < b > < ?php echo anchor(“admin/categories/”,”Manage Categories”);? >. < /b >
< br/ >
Create, edit, delete and manage product categories on your online store.
< /li >
< br/ >
< li > < b > < ?php echo anchor(“admin/products/”,”Manage Products”);? >. < /b >
< br/ >
Create, edit, delete and manage products on your online store.
< /li >
< br/ >
< li > < b > < ?php echo anchor(“admin/pages/”,”Manage Pages”);? >. < /b >
< br/ >
Create, edit, delete and manage pages on your online store.
< /li >
< br/ >
< li > < b > < ?php echo anchor(“admin/colors/”,”Manage Colors”);? >. < /b >
< br/ >



Free download pdf