Search code examples
cssasp.netdotnetnukehead

DotNetNuke/Evoq - add custom stylesheets just before closing head


I'm trying to add two custom css stylesheets just before the closing </head> without breaking skin and/or hacking skin?

I built two css files to turn site into responsive design without actually touching any of the skin/template code so it's necessary to have in last ordering of css files.


Solution

  • Your best best is to register it using the DNN CSS Include skin object, adding it to your skin and simply setting a priority that is high.

    <dnn:DnnCssInclude runat="server" FilePath="~/Your-PathHere" Priority="100" />
    

    You just need to be sure that you have the following register in your skin as well.

    <%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %>
    

    The full API Details for Client Resource Management will help. Highest DNN priority appears to be 35