Closed iantrudell closed 2 years ago
per-template basis now
What does it mean? Custom component template or custom joomla template? Copy files to new place.
It's a first step to move all component media to media folder to use with webassets manager.
per-template basis now
What does it mean? Custom component template or custom joomla template? Copy files to new place.
It's a first step to move all component media to media folder to use with webassets manager.
I used different style.css files depending on which JComments template I was using. They were all located in /components/com_jcomments/tpl/
The issue seems to be the style.css is now hardcoded in /plugins/system/jcomments/jcomments.php:
$document->addStyleSheet(Uri::root(true) . '/media/com_jcomments/css/style.css');
There needs to be a check for whether they are using a custom template, and if so change the path to the custom style.css
@iantrudell as a quick fix just copy css from this folder to media folder.
PS! Web assets manager cannot load assets with dynamic paths. They all hardcoded in json file. It's a long way to move from an old Joomla 1.5 code in component frontend to new Joomla 4 code, where we can use template/layout overrides in ROOT/tempates folder. Not in ROOT/component/ custom template.
CSS now can be located at:
ROOT/templates/{joomla_template_name}/html/com_jcomments/{jcomments_template_name}/
and if not found search in
ROOT/media/com_jcomments/css/tmpl/{jcomments_template_name}/
PS! urls to images must be updated in CSS files.
With the CSS files moving from the tpl folder to media/com_jcomments/css, how do you change CSS on a per-template basis now?
I had a custom template with css in components/tpl//style.css that no longer appears to load in 4.0.17