I am trying to dsiable fontawesome in a child template of cassiopeia as I'm using a different set of fonts.
From what I read adding the following should work
$wa->disableStyle('fontawesome');
joomla-fontawesome.min.css is not loaded
still loaded - because its a dependency of template.cassiopeia.ltr in joomla.asset.json
Labels |
Added:
No Code Attached Yet
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-10-04 11:04:49 |
Closed_By | ⇒ | brianteeman |
Thank you - the override works and seems to be the best option
You should be able to unload fontawesome from Joomla by an available settings in Joomla interface.
You have 2 option:
Override 'fontawesome' to emptiness
$wa->registerStyle('fontawesome', '')
Edit
joomla.asset.json
and remove 'fontawesome' dependnecy fortemplate.cassiopeia
style asset, and add 'fontawesome' dependnecy totemplate.cassiopeia
preset (And make PR, if you want).To keep track of correct dependency tree you have to override existing asset to asset with new dependencies.
joomla-cms/libraries/src/WebAsset/WebAssetItem.php
Line 23 in f520c98