CSS & MasterPage
Within sitefinity 4.0 beta, am I able to edit the masterpages & create a new css theme? It is a little different than what I am use to with 3.7.
Thank you,
Joshua
Joshua,
Hello Thomas ,
The difference is only in the way that templates and themes are registered, but everything else is better than 3.x . You can take a look at our designers guide and SDK.
All the best,
Ivan Dimitrov
the Telerik team
I have gone through the example in the SDK for implementing the University theme,but my CSS styles don't render. I used Chrome's developer tools to look at what is going on, and the main.css and Reset.css style sheets are coming up blank. A look at the Request URL, and the reason is because I am receiving a "403 Forbidden" error when the stylesheet is pulled. If I try to go to the style sheet directly in the browser by going to localhost:30166/.../main.css
In the previous post, I commented about getting a "403 Forbidden" error when trying to access the main.css file of the University sample template. I just realized that the Template is placed under the App_Data folder. Isn't that folder supposed to be restricted so that any content placed in it is not downloadable? This might explain why I can access it. This is by design. But that is where the "HOW TO CREATE A TEMPLATE" document says to put it. In fact, if I try creating the a master file or a css file anywhere under the App_Data folder in Visual Studio, it is not available as an option. When I created my sample University template, I cheated and added the folders and file from the file system and then included them in the project from within Visual Studio. Had I tried doing it from Visual Studio, I would not have been able to do it.
I am confused. How can it be put there and still be accessible on the web?
Hi Tom,
You're right - the App_Data folder is restricted in IIS7 to prevent access to it from the web. I ran into the same problem as you - followed the instructions in the SDK documentation, and then discovered I wasn't getting the theme I expected.
Seems the only solutions are to either a) unprotect the App_Data folder (not a great idea) or b) put the themes somewhere else. I created a folder called App_Themes and put everything in there. Then you just have to change the path when registering the theme with the SItefinity backend.
Hopefully there will be an official answer at some point, but in the meantime at least my theme is working.
Cheers,
Neil.
Hello,
App_Data contains application data files including .mdf database files, XML files, and other data store files.App_Data is a storage point for file-based data stores. The App_Data folder is a folder, which your asp.net worker process has files sytem rights, but isn't published through the web server.
Greetings,
Ivan Dimitrov
the Telerik team
I understand what the App_Data folder is for, and why the files are inaccessibly. But, in the example, the main.css and the Rest.css files are in a subdirectory under the App_Date folder, and the browser is trying to access it there (as per Google Developer tools) Either the example is wrong, or I am doing something wrong. Its probably me, but I am not seeing what I did wrong.
Thanks Neil,
Hi Thomas ,
Please refer to the designers guide and SDK. which contain information for the edition you may use. The SDK contains a sample theme which you can use and see the actual implementation.
Kind regards,
Ivan Dimitrov
the Telerik team
Yes, it was the samples in the SDK that I got my information from, and it has you put the theme under the App_Data folder. I have been through it in detail, and something is not working right.
Hi Thomas Marshall,
Can you please show us what input you have used for your theme path?
Kind regards,
Radoslav Georgiev
the Telerik team
Hello Thomas ,
You have to use slashes, not back slashes in the input field.
Sincerely yours,
Ivan Dimitrov
the Telerik team
That would explain it. Thank you so much. I copied the path from file explorer and edited from their, so I never noticed the difference.