This project is read-only.

add css in themes->Content not working

Jul 23, 2014 at 5:49 AM
i try create Content in my theme and Layout in Shared folder in my Theme,too when i add <link href="~/Themes/Gou/Content/GOU/style/style.css" rel="stylesheet" /> then Server Error in '/' Application. please show me How to add css in my themes, thank pro
my theme folder:
Gou
->Apps
->Content
-->css
->Shared
-->_layoutGOU.cshtml
Jul 23, 2014 at 8:08 AM
Is the URL correct? There is no style folder there
Jul 23, 2014 at 9:53 AM
oh, sorry .The link is right. but it's not work. i drap & drop from my VS2012
Jul 23, 2014 at 10:04 AM
Hi tampro,

Without seeing the full solution it's a little difficult to diagnose, but my guess would be that you may have the view in a non-standard place, and are not in turn using the required bespoke web.config that we use in the view folders. If you look here you should see the section <pages pageBaseType="MrCMS.Website.MrCMSPage"> which uses this class to bring in some custom functionality, particularly the RenderZone function, which is probably the most 'core' feature in there.

I'd suggest going to your admin page in the back end and looking in System -> Logs to see if something has been placed in there. If that's proving a pain because the layout is causing issues with the login page, have a look in the DB. You should be able to see the message and stack trace in there. The rest of the exception is serialized, and will be less easy to read.

Hope this helps.
Jul 23, 2014 at 10:57 AM
thank you for help, so i want to create my theme include Layout and content. my way is that copy all folder App to my theme and just keep folder View then custom it . is my way,right?
Jul 23, 2014 at 11:01 AM
Your way should work as long as you update references to CSS/JS to where you have moved them to, and that you're only copying views, CSS, and JS.

What was the error you were getting? Even if you're getting a server error on the UI, the details should be available either in the log (hopefully) or if not, the Event Viewer on the machine you're running it on.