Help for building simple CMS with codeigniter

#3
[eluser]Chris Newton[/eluser]
Tips / ideas.

1. Create a view named something like 'page.php' and put

Code:
$this->load->view('layout/header');
$this->load->view('content_'.$page);
$this->load->view('layout/footer');

Then you can call it like;

Code:
$data['page']="my_content";
$this->load->view('admin/admin_page',$data);

Then you can have 1 view that calls subviews based on the 'page' you set, making it easier to maintain consistent headers & footers without having to call them individually every time.

2. learn about uri_to_assoc(); I prefer to use name/variable pairs when passing URLs than segments (sometimes you don't need to pass every segment)


Messages In This Thread
Help for building simple CMS with codeigniter - by El Forum - 11-17-2007, 12:03 AM
Help for building simple CMS with codeigniter - by El Forum - 11-17-2007, 12:26 AM
Help for building simple CMS with codeigniter - by El Forum - 11-17-2007, 08:12 AM
Help for building simple CMS with codeigniter - by El Forum - 11-17-2007, 05:15 PM
Help for building simple CMS with codeigniter - by El Forum - 11-18-2007, 02:32 AM
Help for building simple CMS with codeigniter - by El Forum - 11-18-2007, 02:37 PM
Help for building simple CMS with codeigniter - by El Forum - 11-19-2007, 11:55 PM
Help for building simple CMS with codeigniter - by El Forum - 11-20-2007, 01:21 AM
Help for building simple CMS with codeigniter - by El Forum - 06-25-2010, 09:10 AM
Help for building simple CMS with codeigniter - by El Forum - 06-25-2010, 09:13 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.