we use DNN, 2sxc and write 2sxc-modules for our needs with the help of the 2sxc Content object.
In one DNN-installation we have several portals (websites), all portals share the same 2sxc and the same custom skin "XYZ".
Our 2sxc cshtml-templates are stored in the folder Portals/_default/2sxc/Content/, for example Portals/_default/2sxc/Content/history-module.cshtml.
Our skin folder is Portals/_default/Skins/XYZ/. Our main CSS file is Portals/_default/Skins/XYZ/xyz-skin.css.
We are not sure what is the best place to store CSS of our 2sxc cshtml-templates, so the question is about it. For example:
Should the CSS of our custom History Module be stored directly in the
history-module.cshtml
in a<style>....</style>
, so everything lays inside the 2sxc/Content/ folder?Or should the CSS of our History Module rather be stored in our main CSS file
xyz-skin.css
inside the Skins-folder? Where the file "xyz-skin.css" is included inPortals\_default\Skins\XYZ\footer_dnnincludes.inc.aspx
the following way:
<dnn:DnnCssInclude ID="BootstrapCSS" runat="server" FilePath="assets/bootstrap-v4_3_1/bootstrap.min.css" PathNameAlias="SkinPath" />
<dnn:DnnJsInclude ID="BootstrapJS" runat="server" FilePath="assets/bootstrap-v4_3_1/bootstrap.bundle.min.js" PathNameAlias="SkinPath" />
<dnn:DnnJsInclude runat="server" FilePath="assets/js/xyz-main-js-file.js" PathNameAlias="SkinPath" />
<dnn:DnnCssInclude ID="MainSkin" runat="server" FilePath="xyz-skin.css" PathNameAlias="SkinPath" />
- Or some other or mixed solution?
What is the correct way and what is best for the site performance?