Wednesday, July 8, 2009

Links List : External Link in New windows

Scenario:
End Users wanted a way to distinguish External Links and also wanted to open them in separate window.

Solution:
DataView webpart and Conditional Formatting.

external links

Download the Code: Webpart and Image ( ZIP )

Note:
-- Image file need to be copied to 12HIVE/Layouts/Images folder

-- This webpart will only work with Link list and List name has to be LINKS. In case you have some other name of the list storing all the links, you need to open the .webpart in Editor and replace LINKS with new name of the list.

-- Webpart Header Url points to /Lists/Links/AllItems.aspx , so if you are using it for any subject , adjust it one time.

3 comments:

Anonymous,  September 2, 2009 at 12:36 PM  

Sandeep - Thank you so much for this Webpart! I can't tell you how many days I've spent reading blogs, trying JavaScript, snipplets, etc. to get an external link to open in a new window. Your Webpart was so simple, so easy, and worked flawlessly the first time. THANK YOU.

Phyrom,  November 30, 2010 at 10:16 PM  

Hi Sandeep,

It's great that I drop by your blog and found that this should fix what I'm in need for. However, I can access the download of the webpart as it shows me the following message

We can't show you that page
Our server is having a problem. We're working to fix it as soon as we can, so try again in a few minutes.

Please advise if could let me when I can download via phyrom.phat@gmail.com

Thank you.

Regards,
Phyrom

Regards,
Phyrom

Unknown July 30, 2013 at 8:40 AM  


Thanks! But simple and easiest solution is: Create a Site column of "Hyperlink with formatting and constraints for publishing" type and add it in your list, which enables you to specify "Open in New Window" Option!

There are few more possible solutions, including JavaScript, JQuery, SharePoint Designer, List Schema Edit to make SharePoint Link list open in new window at SharePointDiary.com -

SharePoint Link list: Open in a New Window