Interested in Sitecore?

Apply for our Mentorship Program by emailing your resume to Check out our ASP.NET QuickStart and C# QuckStart Libraries. Below is my latest articles.

Tuesday, June 30, 2009

Theme not being applied for a certain page

Scenario: You put the default theme in the web.config. You check the theme value all the way through the event chain and its value is correct but the css references never make it to your page.

Solution: You probably overrode the Page.OnInit event and did not call the base.
NOTE: If your page derives from a base page be sure to check if it is overriding properly by calling base.OnInit(e)

The Page.OnInit method does the following
protected internal override void OnInit(EventArgs e)
if (this._theme != null)
if (this._styleSheet != null)
Obviously by not calling the base.OnInit method on my derived Page class would ignore the inclusion of theme files.

The original answer was found here:

If you have any tips, tricks or resources you would like to share with the group please email them to or and we will add them here.

No comments: