‘Go back to site’ url when you delete a site

One of the things that bothers me, and I know that I'm not the only one, is that when you delete a site you don't have a link back to your parent site or to the top level site.

In this post I will explain the steps that you need to do to make a link on that page which directs you to the top level page.

First we need to open up the 'webdeleted.aspx' page which you can find if you go to the LAYOUTS folder in the 12 hive:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS

Once you located the file you can open it using Visual Studio, SharePoint Designer or in the best program Microsoft has ever made, notepad J.

Once the file is open you need to look for "PlaceHolderTitleBreadcrumb" contentplaceholder and you need to paste following code in it:

<asp:Content ContentPlaceHolderId="PlaceHolderTitleBreadcrumb" runat="server">

 

<a href="<%SPHttpUtility.HtmlEncode(SPControl.GetContextSite(Context).Url, Response.Output);%>">Go back to site</a>

 

</asp:Content>

 

This code will create a link 'Go back to site' which will redirect you to the top level site.

 

So, I'm glad I can use this link, hope you enjoy it as much as I do.