CSS Theme and Master page problems - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

CSS Theme and Master page problems

  • CSS Theme and Master page problems
  • I have some master pages and CSS from an old 3.7 project and tried to insert those into my new ver 5 project.
    But i cannot get the styles to work.

    I followed the instructions but when using Firebug on firefox it tells me there are no styles at all.

    The master page apears to be correct but no styles.

    The steps i did were:

    First i copied a master page into this folder:
     \App_Data\Sitefinity\WebsiteTemplates\AE Template\App_Master
    I then copied a master.css file into this folder:
    \App_Data\Sitefinity\WebsiteTemplates\AE Template\App_Themes\AE Blue Theme\Global

    I then went into Admin/Settings/Advanced/Apearance/Frontend Themes, and i created a new theame called AE Blue Theme with the path :  ~/App_Data/Sitefinity/WebsiteTemplates/AE Template/App_Themes/AE Blue Theme
    Left the other two textboxes empty.

    Then i went into page templates and created a new template, clicking on Browse Other Folders, and going to the folder i created above and selecting my master page, then from the drop down i selcted the Theme (Which i guess must have registered correctly as i could see it in the drop down)

    Saved it all and used it in a page. NO STYLES are all.

    The only thing i can think of is that the name of my stylesheet needs to be something specific and different from main.css, but i cannot find this in the documentation.

    I don't know what to do now.
  • Hey Andrew,

    Seems like you've done everything right... Just a few suggestions to try out:

    1. Remove the spaces in the folder structure / naming.

    2. Open the AppearanceConfig.config located in \App_Data\Sitefinity\Configuration and make sure it reads like this:
    <?xml version="1.0" encoding="utf-8"?>
    <appearanceConfig xmlns:config="urn:telerik:sitefinity:configuration" xmlns:type="urn:telerik:sitefinity:configuration:type" config:version="5.0.2800.0">
            <add path="~/App_Data/Sitefinity/WebsiteTemplates/AEtemplate/App_Themes/AEBlueTheme" name="BlueTheme" />

    3. Inside the \App_Data\Sitefinity\WebsiteTemplates\AEtemplate\App_Themes\AEBluTheme\Global folder create a cssLoadOrder.xml file and make it look like this:
    <?xml version="1.0" encoding="utf-8"?>

    3. To rule out any masterpage hick ups that may block the theme from getting loaded, have you applied the theme to a Sitefinity default template to verify the main.css gets loaded?

    Good luck,
  • Thanks Jochem

    I downloaded a free theme from the market to see if there is something wrong with mine. But had the same problem. It still does not work.
    I had a look at the file you meantioned and it looks like it is supposed to.
    Also created the cssLoadOrder files for both the templates (mine and the one i dowloaded)

    Now what is weird is that i have restarted my computer in the mean time and my css file started working. I don't know at what point though. However the one i downloaded still does not work.
    I applied the theme that does not work when applied to any template.
    When clicking on the css tab in firefox's firebug, it looks like it is empty.
    It's like the system is loading an empty file. But i don't know why.
  • Hey Andrew,

    Almost sounds like a caching issue where your browser doesn't refresh the new theme, but given the marketplace theme that sounds weird...

    Do you have a link for the template downloaded ? I'll load it into a test setup here and see if it works out of the box...

  • http://www.sitefinity.com/marketplace/themes/blue-masters.aspx
    I have now added a new one i made myself and it worked first time. But blue masters still does not work.