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

  • Home
  • SEARCH
  • 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 6137957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:47:27+00:00 2026-05-23T17:47:27+00:00

How do I go about loading css and javascript in my template? I am

  • 0

How do I go about loading css and javascript in my template? I am using kostache and the template loads fine. I am trying not to load template files directly onto the templates themselves but rather do it via the VIEW.

Is this feasible?
From this link

   <head>
<meta charset="utf-8" />
{{>css}}{{>js}}
<title>{{title}}</title>
</head>

Doesn’t say much about those. Are they partial views? If so, does that mean that I create partial views with normal HTML tags linking to css files?

I have this within my view

public function __construct() {
    parent::__construct();
    $this->set(array(
        'reset_css_link' => URL::site('assets/css/reset.css'),
        'style_css_link' => URL::site('assets/css/style.css'),
    ));

How do I pass that to the template.mustache file and loop through it and display what I need to display. That is the part I can’t figure out.

Sample that seems to work:

  • 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-23T17:47:27+00:00Added an answer on May 23, 2026 at 5:47 pm

    I haven’t used Kostache myself (yet!) but studied it briefly a few days ago. As far as I understand it, such things should probably go into your View_Layout class, have a look at how the default View_Layout class does things in Kostache and extend that class in your project.

    https://github.com/zombor/KOstache/blob/master/classes/view/kohana/layout.php

    This discussion is probably of good help as well:
    http://forum.kohanaframework.org/discussion/5722/mustache-kohana-module-for-v3-logic-less-views/p3

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

Sidebar

Related Questions

I'm new to the javascript and CSS. Now i meet some problems about loading
I have read about dynamically loading your class files when needed in a function
I saw a PPT from steve souders about loading images before the css for
I'm loading content into a series of divs using $.load() , and it works
How would one go about loading compiled C code at run time, and then
Please provide a good, thorough tutorial about Java class loading , focusing on how
Where can I find more information about GWT and GWT-Ext's lazy loading?
About 10 years ago, I was using a computer language called INFO on an
I'm want to create a style element after loading of page ( say about
I am using Cherrypy v3.2. I fail to find good docs about how to

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.