Jump to content

JSS - CSS in Controller


Recommended Posts

This is my testasController.php file:

class testasController extends FrontController {

 

public function init() {

parent::init();

}

 

 

public function initContent() {

parent::initContent();

 

$this->setTemplate(_PS_THEME_DIR_.'testas.tpl');

}

 

public function setMedia()

{

parent::setMedia();

Tools::addJS(_THEME_JS_DIR_.'skaic_index.js');

Tools::addJS(_THEME_JS_DIR_.'prototypeplus.js');

Tools::addJS(_THEME_JS_DIR_.'prototype.js');

Tools::addCSS(_THEME_CSS_DIR_.'style.css');

}

 

}

 

 

I have written a script which is required some JS and CSS file. My script doesn`t work and it seems like no JS...

 

Do I have something write in testas.php or testas.tpl file`s ?

 

I have uploaded skaic_index.js , prototypeplus.js , prototype.js in theme/default/cs

And - stlye.css in theme/default/css

 

In a result - Css and js file doesn`t load...

 

Where is a problem? Thank you a lot my friends...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...