TBS in Kohana 2.2+
marzec 26, 2008 | 11:47Due to changes in 2.2 (upgrade notes) some changes in TinyButStrong template integration files are needed. In MY_Controller.php You’ve manually create instance
PHP:
-
$tbs = new Tbs;
of TBS somewhere, and get rid of $this->tbs (just delete this-> string), cause config.php’s autoloading has been disabled.
Next, change Your MY_View.php to like this:
PHP:
-
-
class View extends View_Core
-
{
-
public function __construct($name, $data = NULL, $type = NULL)
-
{
-
if (!Kohana::find_file(‘views’, $name, FALSE, FALSE)) // try global extension first
-
{
-
if (!Kohana::find_file(‘views’, $name, TRUE, “html”))
-
{
-
$type = false;
-
}
-
else
-
{
-
$name .= “html”;
-
}
-
}
-
-
parent::__construct($name, $data, $type);
-
}
-
}
And You’re done. You’ve to adapt examples too.
It works great on trunk rev. 2323 with TBS 3.3.0. Happy coding.

