Detailed Explanation of a Controller & Model? |
08-30-2015, 11:34 PM
(This post was last modified: 08-31-2015, 06:30 AM by Josh1985. Edit Reason: code block formatting errors )
Hi all,
Can anyone explain for a newbie to CodeIgniter a pratical example of how to set up a tabular template using <div> tags in CodeIgniter? What I mean is this: I have spent hours scouring the web looking for a PRACTICAL version of step by step tutorials that not only explains the general idea of what a controller is and does but I would like some instruction on how you are supposed to know when and how to call in say a CI library, arbitrary HTML code, or php code. I have a pretty firm understanding of HTML in that every tag has an open tag a and a close tag, where they go in a html document and why. BUT, when it comes to codeigniter every tutorial I have found only either covers the same thing the codeigniter manual does-which is just a brief overview of how everything works together. OR it shows you how someone created a controller for what they are trying to do which in no way relates to what I am trying to do. What I am hoping someone can help me do is this: I already have 4 HTML pages created outside of codeigniter for a custom XAMPP dashboard for myself, all up and working. What I am looking to do is take my existing pages and have codeigniter load in the static content such as the header, main container's html, the topnav html, the left nav html, sitecontent area html, and the footer into one single views file then have the dynamic content that changes page to page be inserted into its respective page's sitecontent area. This way I can avoid having to make changes to all 4 html files to change a "template element" such as adding a nav link; if I were to do that. Below is the code for the index page to give you an example. I will include the others in the next post should you all need them. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Any help you could offer would be greatly appreciated! Thank you again, Josh |
Messages In This Thread |
Detailed Explanation of a Controller & Model? - by Josh1985 - 08-30-2015, 11:34 PM
RE: Detailed Explanation of a Controller & Model? - by mwhitney - 08-31-2015, 09:00 AM
RE: Detailed Explanation of a Controller & Model? - by Josh1985 - 09-01-2015, 03:38 AM
RE: Detailed Explanation of a Controller & Model? - by mwhitney - 09-01-2015, 09:29 AM
RE: Detailed Explanation of a Controller & Model? - by Josh1985 - 09-05-2015, 07:11 AM
RE: Detailed Explanation of a Controller & Model? - by mwhitney - 09-08-2015, 06:37 AM
RE: Detailed Explanation of a Controller & Model? - by Josh1985 - 09-09-2015, 10:59 AM
RE: Detailed Explanation of a Controller & Model? - by mwhitney - 09-09-2015, 12:59 PM
RE: Detailed Explanation of a Controller & Model? - by Josh1985 - 09-12-2015, 02:09 AM
RE: Detailed Explanation of a Controller & Model? - by mwhitney - 09-14-2015, 07:09 AM
|