Best way to organise pages? |
[eluser]jp612[/eluser]
So what I have just created is a basic layout template with dynamic pages. So far I have one controller file for my individual pages Code: <?php I call my main template here (which is in views) which looks like this: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> And from within the maincontent.php (also under views) I call the page like so Code: <div id="maincontent"> then i want to create a folder under views called pages where all the different pages will be stored. Then also under views i want to create a page-blocks folder where all the page elements (divs) will be stored, these will be called from within the page file. However now i feel like im not doing alot from the controller and all my calling will be scattered all over the place. Is this bad? the actual page variable will be defined in the controller along with page titles etc. Is this a good idea for a setup or is there a better way to do this? PS Im new to Code Igniter
[eluser]AlexJ[/eluser]
You can use the template library for CI, it gives you a more finegrined control over the template library: http://ellislab.com/forums/viewthread/88452/ |
Welcome Guest, Not a member yet? Register Sign In |