Search code examples
kohana-3kohana-3.2

KOHANA Themes - how to set theme in K3


dudes.

I hope this question is not a repost.

I'm newbie on Kohana. I'm working in a system made by other guy.

I need to understand how to set the theme but I can't find anything here nor google. I found that in some systems is set a cookie called theme. But I don't know where to set this cookie.

Could someone tell how to set themes in Kohana?

Thank you all, dudes.

JuanMatias


Solution

  • Kohana is a framework to develop applications from scratch - it doesn't come with any themes like Drupal or WordPress. If what you are looking for are templates, you can use the Controller_Template base class. Just make your controllers extend it:

    class Controller_Extends extends Controller_Template
    

    Then set the template body using something like:

    $this->template->content = $content;
    

    Finally, create the template file in application/views/template.php:

    <!-- Here goes the header -->
    if (isset($content)) echo "<div id='content'>$content</div>";
    <!-- Here goes the footer -->