Controllers per page? |
[eluser]Naveed Hasan[/eluser]
It really depends upon how you are planning your website. This example could make it clear: A company has a website with the following pages: Home, About Us, Products, Contact. Of these, Products may have more sub-pages associated with it for displaying information about individual products. Depending on your Data Model, each product may be identified by an ID/number which corresponds to the ID of the product as stored in your database. So, you have four controllers: Home, About Us, Products and Contact In Products you have a function index() like all other controllers for serving the following URL request: yourwebsite.com/products You also have another function get_list() (or anything like that) in your products controller, to fetch the product with the following URL: yourwebsite.com/products/get_list/3 (product_ID = 3) Please try to read thoroughly: http://ellislab.com/codeigniter/user-gui...llers.html |
Messages In This Thread |
Controllers per page? - by El Forum - 04-05-2012, 05:18 AM
Controllers per page? - by El Forum - 04-05-2012, 01:41 PM
Controllers per page? - by El Forum - 04-06-2012, 06:52 AM
Controllers per page? - by El Forum - 04-06-2012, 09:05 AM
Controllers per page? - by El Forum - 04-06-2012, 12:17 PM
|