In a custom (non-child) template I have the following code for my template.css:This adds a timestamp to the CSS file so that when it's loaded, it's always the latest version. Perfect for development.
When hovering over the css file name in a browser Inspector, it looks something like "mydomain/templates/mytemplate/css/template.css?1715706903:13"
I am now having a go at creating a Cassiopeia child template, but can't work out how to do the same for the new user.css file at media/templates/site/cassiopeia_myNewTemplate/css/user.css
I've tried this:and this:(the difference being the / before media) to no avail.
Can anyone tell me what do I need to do, please?
Code:
JHtml::_('stylesheet', 'template.css', array('version' => $version, 'relative' => true));
When hovering over the css file name in a browser Inspector, it looks something like "mydomain/templates/mytemplate/css/template.css?1715706903:13"
I am now having a go at creating a Cassiopeia child template, but can't work out how to do the same for the new user.css file at media/templates/site/cassiopeia_myNewTemplate/css/user.css
I've tried this:
Code:
JHtml::_('stylesheet', 'media/templates/site/cassiopeia_myNewTemplate/css/user.css', array('version' => $version, 'relative' => true));
Code:
JHtml::_('stylesheet', '/media/templates/site/cassiopeia_myNewTemplate/css/user.css', array('version' => $version, 'relative' => true));
Can anyone tell me what do I need to do, please?
Statistics: Posted by GillianBPP — Thu Jun 06, 2024 5:17 pm