Welcome Guest, Not a member yet? Register   Sign In
Multiple Pages (404 errors)
#12

[eluser]missionsix[/eluser]
[quote author="benaroia" date="1219559104"]Tell y'all what. I'll run through that whole user guide again and then get back to you. It's probably me trying to do everything backwards and inefficiently due to my "newness" to CI. Here's how I'm (in my head) breaking it down:

You have the model. Not quite sure what that does. Right now my model has a loadpage() function that loads a specific page and returns content to the controller which calls the appropriate views.

You have the controller that decides what page get's displayed. I was kinda passing that off to the model and using the controller to link the model with the view. Probably not a good thing?

You have the view which is responsible for all the front end content. The final html code getting displayed. I'm using that by giving it a $data array with content.[/quote]


Controllers determine the page / page content. Model's interact with data. Views display data.



index.php routes to the right controller > method (page) depending on the URL. So index.php/controller_name/method_name/ is the what you base your page structures on. The method would then call the associated model's to build a page. From there the data returned from the models is passed to the view.

There is more to it but that's basically how it works.


Messages In This Thread
Multiple Pages (404 errors) - by El Forum - 08-22-2008, 09:16 AM
Multiple Pages (404 errors) - by El Forum - 08-22-2008, 02:28 PM
Multiple Pages (404 errors) - by El Forum - 08-22-2008, 04:08 PM
Multiple Pages (404 errors) - by El Forum - 08-23-2008, 12:19 PM
Multiple Pages (404 errors) - by El Forum - 08-23-2008, 05:12 PM
Multiple Pages (404 errors) - by El Forum - 08-23-2008, 05:19 PM
Multiple Pages (404 errors) - by El Forum - 08-23-2008, 05:20 PM
Multiple Pages (404 errors) - by El Forum - 08-23-2008, 05:32 PM
Multiple Pages (404 errors) - by El Forum - 08-23-2008, 06:57 PM
Multiple Pages (404 errors) - by El Forum - 08-23-2008, 07:13 PM
Multiple Pages (404 errors) - by El Forum - 08-23-2008, 07:25 PM
Multiple Pages (404 errors) - by El Forum - 08-23-2008, 08:59 PM
Multiple Pages (404 errors) - by El Forum - 08-23-2008, 09:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB