Template Lib/Parser question - 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: Template Lib/Parser question (/showthread.php?tid=53888) |
Template Lib/Parser question - El Forum - 08-13-2012 [eluser]the_unforgiven[/eluser] Using Phil Sturgeons library for templating i have Code: $this->template like Code: $template['clientlist'] Template Lib/Parser question - El Forum - 08-13-2012 [eluser]the_unforgiven[/eluser] Anyone? This will be what i should write in my view file to say if the template is a specific page/template then do this else do this. Template Lib/Parser question - El Forum - 08-13-2012 [eluser]Aken[/eluser] After a quick glance through the source, I don't see anything that passes the view name to the template content. You'd have to add that, either to your $data array, or modify the Template library to do it automatically. Template Lib/Parser question - El Forum - 08-14-2012 [eluser]the_unforgiven[/eluser] My full controller Code: $total = $this->client_model->client_count(); So now i need to know how to get in my view file, if the template is set to clientlist for example so this, else show this... Template Lib/Parser question - El Forum - 08-16-2012 [eluser]Phil Sturgeon[/eluser] Code: $this->template TADAAAA! Template Lib/Parser question - El Forum - 08-16-2012 [eluser]the_unforgiven[/eluser] Gracias great one! Thanks Phil Template Lib/Parser question - El Forum - 08-16-2012 [eluser]the_unforgiven[/eluser] So would just do in view right: ?php if ($template['is_client_list'] == TRUE) { ?> blah blah |