Changing 'Go back' link in AccessDenied.aspx under Sharepoint 2010 -- 金大昊(jindahao)

Changing 'Go back' link in AccessDenied.aspx under Sharepoint 2010

 
I recently encountered an usability issue in a scenario involving several site collections under the top site collection. Namely, the 'Go back to site' link would return back to the top page of the current site collection. This is OK as long as you have the permission to access it. If you don't, but still accidentally click the link, you end up in a dead loop (i.e. you get stuck on the AccessDenied.aspx page).

To avoid this, I went ahead and implemented a more common 'Go back' functionality. To a SharePoint newbie that I am, it can be difficult to find the spot to change this. Once I found it, it turned out to be fairly simple:

1. Make a copy of 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\simplev4.master"

2. Open 'simplev4.master' in your favorite editor and replace the following:
<SharePoint:ReturnLink Text="<%$Resources:wss,multipages_back_to_site%>" Id="idSimpleGoBackToHome" runat="server"/>  


with the following:
<asp:HyperLink NavigateUrl="javascript:history.go(-1)" Id="idSimpleGoBackToHome" Text="Go back" runat="server"/>

你可能感兴趣的:(SharePoint)