Search code examples
twitter-bootstrapcssorchardcmsorchardcms-1.8

Loading custom.css after PJS.Bootstrap default css in Orchard


So we have created a our own theme in Orchard CMS using CodeGen. And we're using PJS.Bootstrap on top of it. Now my task is to create a custom.css file in Theme's Style to do some basic styling. For this i added Style.Include("custom.css"); in the layout.cshtml file in Views of our theme. The file is getting loaded but before the Bootstrap's default css, like shown below:

<link href="/Themes/OurTheme/Styles/custom.css" rel="stylesheet" type="text/css">
<link href="/Themes/PJS.Bootstrap/Styles/site-default.min.css" rel="stylesheet" type="text/css">

Any way i load our css after the PJS.Bootstrap default css?

Thanks in advance.


Solution

  • Don't use the Layout.cshtml but CustomResources.cshtml to load your custom resources. Just check for the file in the PJS.Bootstrap/Views folder.

    Either insert your resources directly in there, or override it with an alternate in another custom theme inheriting from PJS.Boorstrap.