Welcome Guest, Not a member yet? Register   Sign In
How do you include your pages ?
#2

[eluser]Jesse B.[/eluser]
One of the neat features of CI is that it does this kind of logic for you automatically.

Based on your example, you'd have controllers for "news", "roster", "wars", "contact", "downloads", "palmares", and "teams". Within those controllers, you could have methods for "add", "view", "edit", "delete", or whatever makes sense.

The controllers define what your application does. CI performs routing to translate a URL into the appropriate controller and method to call. For example, by default, a URL like this:

Code:
http://example.com/index.php/roster/view/21

...would call the view() method of the roster controller. 21 would be passed as a parameter of view().

When processing is finished, a controller will typically load one or more views, which are like templates for your application. You could make one view per controller, or you could make common views for the site header and footer, and call those in each controller. The choice is based on what makes sense to you.


Messages In This Thread
How do you include your pages ? - by El Forum - 10-29-2008, 02:46 AM
How do you include your pages ? - by El Forum - 10-29-2008, 03:49 AM
How do you include your pages ? - by El Forum - 10-29-2008, 04:44 AM
How do you include your pages ? - by El Forum - 10-29-2008, 04:48 AM
How do you include your pages ? - by El Forum - 10-29-2008, 05:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB