Learn more about SQL Server tools

 

Tutorials          DBA          Dev          BI          Career          Categories          Videos          Whitepapers          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Events

DBA    Dev    BI    Categories

 

Pop Up New Window Using the Out-of-the-box Links List


By:   |   Read Comments   |   Related Tips: > Sharepoint

Problem

I would like to selectively open specific links in a new browser window from an out-of-the-box SharePoint "Links List".

Solution

SharePoint "links lists" are very handy. The only problem is that out-of-the-box, the links take over the browser window. While desirable for some navigation tasks, it is not always optimal.

Sometimes I use a Content Editor Web Part to make custom links, but these are not permission sensitive the way SharePoin Lists can be.

There is a 3rd party web part add-on called "Windows Links" for WSS3/MOSS2007 (see this article) that works just fine, but it requires an installation of the web part. This can (and probably will) cause issues during an upgrade to the next version of SharePoint.

Hoping that a feature would be included in SharePoint 2010, I decided to try the new Links List in the beta of SharePoint 2010. I was sad to learn that this potential improvement was not included...

...which prompted me to look for another solution. Fortunately, I ran across this solution from an old blog. I credit Ricky Spears for originally posting this solution, however, the original code contained a text wrapping error. "Wmhogg" in a comment (from the original post) had pointed this out. (Nice catch Wmhogg!). So the code provided in this tip is both corrected and condensed.

The basic idea is that Link List is added to a Web Part Zone on a site page or web part page. Then a Content Editor Web Part is added (anywhere) onto the same page.

The code is entered into a Content Editor Web Part using the "Source Editor" (not the Rich Text Editor), as pictured below.

(To copy/paste this code, click this link.)

The Content Editor Web Part can be hidden if desired (look in the "Layout" section of the web part options).

And finally, when creating links in the Links List, add #openinnewwindow on the end of each link that you would like to open in a new window.

Next Steps


Last Update:






About the author
MSSQLTips author Rob Fisch Rob Fisch has worked with SQL Server since version 6.5 as a dba, developer, report writer and data warehouse designer.

View all my tips


 









Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name    *Email    Notify for updates 


Get free SQL tips:

*Enter Code refresh code     



Learn more about SQL Server tools