Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5979773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:42:24+00:00 2026-05-22T21:42:24+00:00

I just asked a question ( Templates In Kohana 3.1 ) about templates and

  • 0

I just asked a question ( Templates In Kohana 3.1 ) about templates and now I know that I should use Kostache. It’s a module for the Mustache template language.

Anyway, I just enabled Kostache module for my Kohana 3.1 and all works. It’s installed correctly! What to do next? How to use it?

Where should I put my views now?
What my controller should extend?
How to assign variable?
How to make header, footer etc. for views?

Maybe there are step to step guide for it? This and this won’t help me a lot…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:42:25+00:00Added an answer on May 22, 2026 at 9:42 pm

    Where should I put my views now?

    View classes contain logic for your templates and by convention should be stored in classes/view/{template name}.php

    Templates contain your HTML and should be stored in the templates directory in the root of your module, e.g. templates/login.mustache

    By default kostache will try and work out the location of the template based on your view class’ name.

    If your view class is called View_Admin_Login then kostache will look for templates/admin/login.mustache

    What my controller should extend?

    You do not need to extend any special controllers, the normal Controller will work fine as a base.

    How to assign variable

    Controller:

    $view = new View_Admin_Login;
    
    $view->message = 'Hello';
    $this->response->body($view->render());
    

    Template:

    {{message}}
    

    Of course, any methods or variables you declare in your view class will also be available in
    the template. If there is a class variable and method with the same name then the method will always take precedence over the variable.

    How to make header, footer etc. for views

    It will help if you read the kostache guide. The idea is that your views extend Kostache_Layout, see also the layout template

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just asked a question that helps about using generics (or polymorphism) to avoid
I've just asked question about Task but realized that I actually want to ask
I just asked a question about use of these. They were suggested to me
I know I've just asked a question about this, but I cannot figure out
Just asked a question about linking Boost libraries in the make file. Thanks to
I've just asked a question about an hour ago, while waiting for replies, I've
I just asked another question about pascal triangle about finding sum of 1500th row.
I just asked this question, but failed to specify that I would like to
I just asked a question about Regex, and received a great answer: JavaScript Split
I just asked a question about whether it was possible to write a web-page-checking

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.