SharePoint Developer Center >
SharePoint Products and Technologies Forums
>
SharePoint - Design and Customization
>
How to change the theme of an error page
How to change the theme of an error page
- Hi,
I use the 'simple' theme all over the WSS.
But, when a user reaches a site where he/she has no rights the error page shows in another look.
How can I change the look and feel of the error page according to the theme I use in the WSS?
Answers
- It's a good idea to backup before making any changes to files in the 12 hive. Also be careful with installing any service packs as they may overwrite your changes. I would use one of this methods for updating files in the 12\template\layouts folder http://support.microsoft.com/default.aspx/kb/944105
My SharePoint Blog - http://www.davehunter.co.uk/blog- Marked As Answer byXue-Mei Chang-MSFTMSFT, ModeratorFriday, November 13, 2009 8:13 AM
All Replies
- Hi,
You will need to edit the master page "simple.master" located at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS
In the head tag, between SharePoint:CssLink and SharePoint:ScriptLink add the SharePoint Theme control. for example
Hope this helps.<SharePoint:CssLink runat="server" Alternate="false"/> <SharePoint:Theme runat="server" /> <SharePoint:ScriptLink language="javascript" name="core.js" runat="server" />
Paul. - It's a good idea to backup before making any changes to files in the 12 hive. Also be careful with installing any service packs as they may overwrite your changes. I would use one of this methods for updating files in the 12\template\layouts folder http://support.microsoft.com/default.aspx/kb/944105
My SharePoint Blog - http://www.davehunter.co.uk/blog- Marked As Answer byXue-Mei Chang-MSFTMSFT, ModeratorFriday, November 13, 2009 8:13 AM
- Gentlemen,
I did the procedure #2 of the solution of Dave, meaning that I made a copy of the layouts dir and changed the Virtual Directory in IIS to look in the new layouts dir that I created. When I change the simple.master as Paul suggested I still get to see the error page without the theme I want to use.
The errorpage that is shown seems to be located at another _layouts dir, namely:
http://sharepoint/projecten/90003/_layouts/AccessDenied.aspx?Source=http%3A%2F%2Fsharepoint%2Fprojecten%2F90003%2Fdefault%2Easpx
What am I missing and how can I change this? - Hi there.
The best way to accomplish this and still adhere to Microsoft guidelines and service packs/hotfixes compatibility, is to write a custom HTTP module that will intercept the error page and redirect to a custom page of yours.
This custom page may typically be a copy of the original error page, but it uses a custom master page and style sheet.
Regards,
Magnus
My blog: InsomniacGeek.com - Personally I would hope that Microsoft releases a service pack/hotfix that solves the problem and actually adds the theme support into these pages themselves.
;-)


