Template |
[eluser]dudzartiaga[/eluser]
Hi Everyone, I am new to web development and I have simple question regarding Template 1.4.1. I have 7 regions as shown below. My default controller renders those regions in template and it was good (See index method below). However, I would like to see the same layout, but with different content. Exactly the same except for content region. I am wondering if there's a way I can achieve what I want without writing again the same command in index method. A one liner code probably or two. Can you show me how? I tried the override in write_view and I can't make it work or I misunderstood the use of it. See add function below. Code: $template['default']['regions'] = array( Index method Code: public function index() Code: public function add() Thank you very much!
[eluser]CroNiX[/eluser]
It might help to tell us what "template 1.4.1" is and where you got it from, since it's not a part of stock CI. There are many template libraries out there.
[eluser]dudzartiaga[/eluser]
It is a Colin Williams's Template plugin. Here's the url. http://williamsconcepts.com/ci/codeignit.../template/ |
Welcome Guest, Not a member yet? Register Sign In |