Blogroll

Tuesday, May 15, 2012

SharePoint Redirect Web Part:


This can be accomplished using the java script on the SharePoint Site page. This script will prompts an end user that they will be redirected to another page after a certain period of time. .

1. First click Site Actions > Edit Page in the top right section of your browser window, where you wish to place the Redirect webpart.
2. Next you can add the Content Editor Web Part to a zone of your choice. Click on the Add a Web Part button ontop of the zone you chose.
3. This will bring up the Add a Web Part window. Scroll down to the Content Editor Web Part.
4. This will place the CEWP into the Top Zone or whichever zone you added it to. Clicking Edit > Modify Shared Web Part.
5. Once you have clicked the modify button a window opens on the right hand side of the browser with various options for the web part. You need to add your code the webpart so we will click the Source Editor… button.
6. Copy and paste the following code:

<'script type="text/javascript">
{
alert("This Site has been moved, please update your existing bookmarks. You will be re-directed momentarily");
}
<'/script>
<'meta http-equiv="refresh" content="15;url=http://yoursharepointURL.com/pages/default.aspx">


Into the Source Editor Windows that pops up when we clicked the Source Editor… button.
Note: Use the new SharePoint Site url where you want to redirect the users in the 'url=http://' (last line of the code snippet). 
7. Click the Save button, publish the page and your done. Users who access this page will be greeted with a popup and redirected in 10 seconds.
There are some drawbacks to this approach, and it's generally considered bad form to use a refresh tag to forward users. For one it breaks your users' Back button in their browsers. It can also confuse your users, especially if the redirect is fast and there isn't a note on the page explaining that the site has moved. Finally, make very sure the URL you're redirecting them to is valid. If not they get stuck on a dead page and no way to use Back to get out. Sometimes it is your only option though.
You can also choose to create a Redirect Page on the old site and use that as a redirect option, Unfortunately this solution only works on Publishing sites.

1. Go to your Pages document library and Click new.
2. Select Redirect Page, Provide a name in the title and click Ok.
3. Once the Redirect Page is created you'll need to Edit its Properties and enter the URL you want it to redirect to.
You'll also need to preview the page and check it in before it will work.

No comments:

ShareThis

snow flakes

blogger widgets Blogspot Tutorial

LinkWithin

Related Posts Plugin for WordPress, Blogger...