Skip to main content
1 vote
Accepted

Can't use WebAsset useStyle in index.php in Joomla! 5

Based on your working PHP code, the actual path to the file is this: media/templates/site/base/css/template.css But in JSON you wrote this: media/templates/site/base/template.css Correct it and it ...
Sharky's user avatar
  • 11.5k
1 vote
Accepted

How to use component's joomla.asset.json file in module?

You have to use a relative path in your call to addRegistryFile, ie: $wr->addRegistryFile('media/com_foo/joomla.asset.json');
Robbie Jackson's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible