Removing Block CSS files
Permalink
Hi
I am working on a theme and when I add a block to the page and assign it to use a template I have done it adds in the CSS into the DOM. I would like to remove this and have the CSS all in one file together.
So, if I add a an autonav block and use mega_menu template, the following CSS is in the page;
<link href="/application/blocks/autonav/templates/mega_menu/view.css?ccm_nocache=c2f810f838c393a212b03734e81cad1b159e6ccc" rel="stylesheet" type="text/css" media="all">
I managed to remove the font awesome from the CSS by doing this:
$this->providesAsset('css', 'font-awesome');
But, I cannot seem to do this with the block CSS
I am working on a theme and when I add a block to the page and assign it to use a template I have done it adds in the CSS into the DOM. I would like to remove this and have the CSS all in one file together.
So, if I add a an autonav block and use mega_menu template, the following CSS is in the page;
<link href="/application/blocks/autonav/templates/mega_menu/view.css?ccm_nocache=c2f810f838c393a212b03734e81cad1b159e6ccc" rel="stylesheet" type="text/css" media="all">
I managed to remove the font awesome from the CSS by doing this:
$this->providesAsset('css', 'font-awesome');
But, I cannot seem to do this with the block CSS
You can't use it as an asset because in this case that style is only included if that block is on the page and it's not a registered asset.