Template Library Version 1.4.1 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Template Library Version 1.4.1 (/showthread.php?tid=12840) |
Template Library Version 1.4.1 - El Forum - 03-03-2011 [eluser]nsbingham[/eluser] Nevermind the previous post. I had a mis-spelling in the module name I was loading. Template Library Version 1.4.1 - El Forum - 03-23-2011 [eluser]snaKeSz[/eluser] Hi, there i just checked out your template engine. i get stuck at one point: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); it says: " Fatal error: Call to a member function show() on a non-object in C:\Server\xampp\htdocs\CodeIgniter\application\controllers\page.php on line 17" i got a controller called news with a method called show. Whats wrong? could you help me please? Template Library Version 1.4.1 - El Forum - 03-23-2011 [eluser]permanentbraindamage[/eluser] $this refers to the current controller, not some other controller. Therefore, $this->news would need to be a property (or model or library etc) of the current controller. In your case, I speculate thta you most likely meant calling a show() method from a news model in $this controller. You will need to load the news model, or rework your controllers or read up on the CI and PHP documentation. Template Library Version 1.4.1 - El Forum - 03-24-2011 [eluser]Unknown[/eluser] so i'm trying to get this setup with the latest version of CI and i cannot get it to bind the fields in the sample template. The title still shows Code: <?= title ?> anyone know if there are issues with the latest version of CI and Template Library 1.4.1? :-S Template Library Version 1.4.1 - El Forum - 03-24-2011 [eluser]cryogenix[/eluser] there must be something wrong with your template's config. would you mind posting them? or your short_open_tag in php.ini might be off. but really, please do use <?php echo instead to ensure maximum compatibility. Template Library Version 1.4.1 - El Forum - 03-30-2011 [eluser]otherjohn[/eluser] Hi, I have somewhat posted this question elsewhere, but now I believe it might have something to do with the templating engine and HMVC. In my Default template, I have Code: <nav id="subMenu"> which throws the following error Code: ErrorException [ Fatal Error ]: Call to a member function select() on a non-object If I was to put that line of code in a view, no error is thrown. I am not sure why it is giving this error? Any ideas/ Template Library Version 1.4.1 - El Forum - 06-09-2011 [eluser]emorling[/eluser] Thanks for making this availabale! Is there a Wiki Parser you would reccomend, that I can use with the Template engine? Template Library Version 1.4.1 - El Forum - 06-13-2011 [eluser]Andreas Karlsson[/eluser] Just wrote a hook that someone might be interested in, it makes you able to use a default view in a region. Make sure you load the hook file after template has loaded. eg, post_controller_constructor. config/config.php Code: $config['enable_hooks'] = TRUE; config/hooks.php: Code: $hook['post_controller_constructor'] = array( config/template.php: Code: $template['default']['regions'] = array( hooks/your_hook_class.php: Code: class Your_hook_class { Hope it helps. If someone knows a better way, or has some questions. Feel free Template Library Version 1.4.1 - El Forum - 06-23-2011 [eluser]Uplift[/eluser] is it possible to add a bit of code or a region to just 1 page? Template Library Version 1.4.1 - El Forum - 07-21-2011 [eluser]Carlton[/eluser] I thought it was definitely worth sharing this... I couldn't get the add_js features to work, I thought it may have been problems with CI 2.0 so did fresh install and it worked...eventually I found out that I had my add_js line above the template code which selects the template to use, looking back it was a silly mistake but hey. Code: public function page() |