Client Dependency Framework and Conditional Comments
Often designers use
<!--[if lte IE 8]>
conditional comments to include different css depending on the internet explorer version.
As far as I can tell the client dependency lines such as:
@Html.RenderCssHere()
render all css and even if using groups just renders the groups as separate bundles one after the other.
Is there any way to render a single group? and so to use groups for IE versions - allowing us to have multiple RenderCssHere(group) lines between conditional comments?
I believe this is possible by using a different renderer (you can note that the default package comes with an unused 'LazyLoadRenderer' in the ClientDependency.config).
From what I understand you add a second renderer by using the method implementation which takes a Renderer Name as a string:
I haven't had a go at getting this working myself so I can't help you with the paths aspect (I suspect it's something to do with the static PathsCollection object) but the documentation is usually a good place to go for things like that :)
Client Dependency Framework and Conditional Comments
Often designers use
conditional comments to include different css depending on the internet explorer version.
As far as I can tell the client dependency lines such as:
render all css and even if using groups just renders the groups as separate bundles one after the other.
Is there any way to render a single group? and so to use groups for IE versions - allowing us to have multiple RenderCssHere(group) lines between conditional comments?
Hi Craig,
I believe this is possible by using a different renderer (you can note that the default package comes with an unused 'LazyLoadRenderer' in the ClientDependency.config).
From what I understand you add a second renderer by using the method implementation which takes a Renderer Name as a string:
I haven't had a go at getting this working myself so I can't help you with the paths aspect (I suspect it's something to do with the static PathsCollection object) but the documentation is usually a good place to go for things like that :)
https://github.com/Shazwazza/ClientDependency/wiki
Regards, Chris
That seems like a workaround? If there's two renderer's what if you what a third block? you have to make your own?
It feels like a simple fix would just be an overload like:
In essence, yes - however you could always create your own renderer which does that.
While trying to answer my query on SRI in the CDF, I've come across something that should answer your question:
https://github.com/Shazwazza/ClientDependency/wiki/Forced-Providers
Ironically it seems that to add SRI support to the CDF, I may also have to implement my own renderer :)
Regards, Chris.
is working on a reply...