I use in my Controller this code, for own assets:
public function __construct()
{
parent::__construct();
$this->addCss("/plugins/vedev/realty/assets/css/offers.css", "1.0.0");
$this->addJs("/plugins/vedev/realty/assets/js/offers.js", "1.0.0");
BackendMenu::setContext('Vedev.Realty', 'realty', 'offers');
}
In backend this work, in backtofront not.
I fix it write to cms page code section:
function onInit() {
// FIX assets
$this->addCss("/plugins/vedev/realty/assets/css/offers.css", "1.0.0");
$this->addJs("/plugins/vedev/realty/assets/js/offers.js", "1.0.0");
}
Is there a way to not reconnect resources on the page manually?