![]() |
Please help me. I'm a newbie - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Please help me. I'm a newbie (/showthread.php?tid=35362) |
Please help me. I'm a newbie - El Forum - 10-27-2010 [eluser]Unknown[/eluser] I create Main Controller with index action. Code here: Code: index() Please help me. I'm a newbie - El Forum - 10-27-2010 [eluser]LifeSteala[/eluser] Welcome to Code Igniter. In future, please try to wrap your code in the code tags. In your template.php view, add this: Code: <div id=‘header’> That should theoretically work. Good Luck! Please help me. I'm a newbie - El Forum - 10-27-2010 [eluser]cereal[/eluser] I can confirm it works, but this won't load the menu() function, it will load only the view. I would create a model for the menu: Code: function list() and then write the controller index() like this: Code: function index() Or, in alternative, load more views: Code: function index() bye ![]() Please help me. I'm a newbie - El Forum - 10-27-2010 [eluser]Unknown[/eluser] So sorry I'm poor english, The above problem is a small factor in my project. I want to present more clearly. I want to create layout for my website like this: [code] |-----------------------------------------------------------------------------| | HEADER AREA | | --------------------- | | Menu-> Home * Products * About Us * Contact <-Menu | |-----------------------------------------------------------------------------| | LEFT CONTENT | | | | | | This content | | | is the categories| | | of products | THIS IS MY LAYOUT. It's very simple | | | | | | I call this area is "MAINCONTENT" | |------------------| | | Some Image Here | | | | | |------------------------------- Please help me. I'm a newbie - El Forum - 10-27-2010 [eluser]cereal[/eluser] Please explain better, if I'm understanding, your problem relates to the layout not to CodeIgniter. p.s. If you use a code tag in your replies, your posts will look much better ![]() Please help me. I'm a newbie - El Forum - 10-27-2010 [eluser]Mischievous[/eluser] Really you could load all your views? To make it less repetitious you could place your main parts in a extended controller ![]() Code: $template = array( OR.... you could use a template library. Template Library Phil Sturgeon's Dwoo Template Library OR... you could make your own? |