Joomla Asked by advait-varma on December 9, 2021
I am new to Joomla and just downloaded a template (from my company) and deployed it on XAMPP.
When I try to edit the CSS and refresh the page, the css does not get updated. I have tried clearing the cache and refreshing, but no such luck.
Joomla's default Protostar template includes CSS files with
JHtml::_('stylesheet', 'template.css', array('version' => 'auto', 'relative' => true));
The media version does NOT change when you make changes in your CSS. You could add your own timestamp to force a browser to re-load the CSS instead using it from cache.
In your template's index.php you could add something like:
use JoomlaCMSHTMLHTMLHelper; HTMLHelper::_( 'stylesheet', 'your-css-file.css', [ 'version' => filemtime(JPATH_THEMES . '/your-template/css/your-css-file.css'), 'relative' => true ] );
Answered by pe7er on December 9, 2021
1 Asked on September 5, 2021 by user11034850
1 Asked on September 5, 2021 by chaosxmk
2 Asked on September 5, 2021 by marckson
0 Asked on September 5, 2021 by ffrewin
0 Asked on September 5, 2021 by miasto
1 Asked on September 5, 2021 by norberto-gomes
1 Asked on September 5, 2021 by aheavyobject
2 Asked on September 5, 2021 by hamlet-kraskian
1 Asked on September 5, 2021 by webchun
1 Asked on September 5, 2021
0 Asked on September 5, 2021 by kirpal
2 Asked on February 18, 2021
1 Asked on February 7, 2021 by sajeeb-ahamed
1 Asked on February 5, 2021 by andrea-suriani
1 Asked on January 21, 2021 by lecraver
3 Asked on December 28, 2020 by wbdevlop
1 Asked on December 26, 2020 by exprove
1 Asked on December 23, 2020 by kiasaty
1 Asked on December 3, 2020 by n-h
0 Asked on November 11, 2020 by geoplous
Get help from others!
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP