how to use css file from starter_theme in single page controller
Permalink 1 user found helpful
I want to design the single page php file in controller.I create the css file and then placed inside application/theme/starter_theme. I don't know how to call that css file inside controller single page.
Thanks for a reply.But i got below error when i try.
Class 'Application\Controller\SinglePage\Dashboard\SiteManagement\Core' not found
Class 'Application\Controller\SinglePage\Dashboard\SiteManagement\Core' not found
Put a back slash before Core OR use Core in the top of the controller
$html = \Core::make('helper/html');
Thanks again.
Error lost.But css file doesn't work.
Error lost.But css file doesn't work.
Chrome browser REALLY likes to cache CSS files. Make sure you're cache is really clear or try another browser that's never seen that site before to see if the CSS is kicking in.
Thanks for a reply.
I tried chrome browser cache clear and run in another browser.But doesn't work.
Controller or view where from should i call css file? I try to call from controller php file.
I tried chrome browser cache clear and run in another browser.But doesn't work.
Controller or view where from should i call css file? I try to call from controller php file.
'path/to/my.css' means you have to use your real path to the css file, e.g. application/theme/starter_theme/YOUR_CSS_FILE.css
Try this in your controller:
Then clear site cache in Dashboard, reload the page Ctrl-F5 and check if your css loaded in the page source.
Try this in your controller:
public function registerViewAssets($outputContent = '') { $html = $this->app->make('helper/html'); $this->addHeaderItem($html->css("application/theme/starter_theme/YOUR_CSS_FILE.css ")); }
Then clear site cache in Dashboard, reload the page Ctrl-F5 and check if your css loaded in the page source.
Thanks a lot linuxoid.
I also tried your code too.But doesn't work.
I was wrong.The php file I want to design is view page.I call controller php file from form in view.
I also tried your code too.But doesn't work.
I was wrong.The php file I want to design is view page.I call controller php file from form in view.