Please help me. I'm a newbie |
[eluser]Unknown[/eluser]
I create Main Controller with index action. Code here: Code: index()
[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!
[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 ![]()
[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 | | | | | |-------------------------------
[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 ![]()
[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? |
Welcome Guest, Not a member yet? Register Sign In |