• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What's a Good, Simple, Template Library?

#1
[eluser]nextexile[/eluser]
Looking for a nice little template library.

I found the following two but neither seems to be tested up to current version of CI.

http://williamsconcepts.com/ci/codeignit...index.html

http://maestric.com/doc/php/codeigniter_template

Any recommendations or opinions on ones listed above?

#2
[eluser]Aken[/eluser]
What features do you want/need?

#3
[eluser]nextexile[/eluser]
Just something simple to define a header / footer template and then load only the content. Kind of like the second link in my first post.

#4
[eluser]Aken[/eluser]
There's no reason you couldn't easily update that library to work with modern versions of CI. The library is pretty simple.

#5
[eluser]cPage[/eluser]
Many thanks to bigbusty who helped me on that sticky problem.
forums/viewthread/231204/

Code:
<?php
class Template
{
    private $views;
    private $ci;

    public function __construct()
    {
        $this->ci =& get_instance();
    }

    public function set($name, $view, $data)
    {
        $this->views[$name] = $this->ci->load->view($view, $data, true);
        return $this;
    }

    public function load($master_template)
    {
        $this->ci->load->view($master_template, $this->views);
    }
}
/* Location: ./application/librairies/template.php */


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.