CSS injected into HEAD

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hello,
I am adding new pages to the NopCommerce.  These are mostly content pages for my site, and they are controlled by different CSS than the Theme.

The problem is that NopCommerce is dynamically injecting a new CSS sheet into the HEAD section of every page.

How do I disable this?

thanks


SAMPLE:

<link href="../App_Themes/DarkOrange/styles.css"
13 years ago
administrator/Global Settings ==> SEO/Display ==> "Store Theme" to change theme .


nick name: anhnh18387 (yahoo)
13 years ago
I am not asking how to change the theme.

I am asking how to disable the CSS that is automatically injected into any WebForm that is added to the project regardless of whether it was part of the original NopCommerce.
13 years ago
You have to do 2 things;
1) Make sure your page doesn't inherit from BaseNopPage
this is not good for you:

public partial class AccountPage : BaseNopPage
{


Make it inherit from System.Web.UI.Page

public partial class AccountPage : System.Web.UI.Page
    {


and in the aspx file add Theme="nopClassic" (or any other theme) in the top

<%@ Page Language="C#" MasterPageFile="~/MasterPages/OneColumn.master" AutoEventWireup="true"
    Inherits="NopSolutions.NopCommerce.Web.AccountPage" CodeBehind="Account.aspx.cs" Theme="nopClassic" %>

If you don't have any theme then just create an empty directory in the App_Themes folder and use its name as your theme name. If you don't do it then it will just load the default themes css files.
13 years ago
That is what I am talking about!

Thanks for taking the time to write such a detailed and accurate response.

cheers
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.