Template Library Version 1.4.1 |
[eluser]Evollution[/eluser]
ok i change class to main and i get error : The "header" region has already been defined.
[eluser]Evollution[/eluser]
http://www.fifago.com/demo2/index.php/main why i am getting this error
[eluser]WanWizard[/eluser]
Because you initialize the template twice, or add the same region twice? Difficult to guess without seeing your code. When you load the Template library, it auto initializes the active template defined in the config file. You don't have to use set_template() yourself.
[eluser]Evollution[/eluser]
config/template Code: $template['default']['template'] = 'template'; controler/main.php Code: <?php view/template.php Code: <html>
[eluser]WanWizard[/eluser]
Look at the array created in config/template, and you'll see you define 'header' and 'footer' twice. Once as value of the region array, and once as key value in that same array. Do a var_dump() to see what it looks like. If you use Code: $template['default']['regions']['header'] = ...
[eluser]Evollution[/eluser]
ok i removed and now i shoud only change <?= $header ?> with my code yes ?
[eluser]WanWizard[/eluser]
Don't know what you mean. Your template looks ok to me (altough I wouldn't use <?=, but use <?php echo).
[eluser]Evollution[/eluser]
i'm getting a new error : A PHP Error was encountered Severity: Notice Message: Undefined property: Main::$template Filename: controllers/main.php Line Number: 14 Fatal error: Call to a member function write() on a non-object in /home/fifagoc1/public_html/demo2/system/application/controllers/main.php on line 14 Code: <?php
[eluser]steelaz[/eluser]
Updated line #443 in Template.php (1.4.1) from Code: $filepath = base_url() . $script; Code: $filepath = (substr(strtolower($script), 0, 4) == 'http') ? $script : base_url() . $script; so CDN scripts could be added: Code: $this->template->add_js('https://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js');
[eluser]nsbingham[/eluser]
Evollution - I'm experiencing the same error. Were you able to figure it out? |
Welcome Guest, Not a member yet? Register Sign In |