I'm using SP 2013 library web parts on my sites. The web part displays folders, when the folders are clicked, it opens the folder inside of the web part (like a preview). We would like the links displayed in the library Web part to open the folders in a window, not inside the web part. Thanks for your suggestions!


You will need to override the HandleFolder javascript method in order to achieve this. Please paste below code in a Content editor webpart on your page and the folders should open in new tab.

function HandleFolder(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) {
    var parts = new Array();
        parts = c.toLowerCase().split('%2f');
        c = c.replace('SitePages/Home.aspx',parts[1]);
    return false;

Reference - https://amalhashim.wordpress.com/2013/12/03/sharepoint-2013-open-folder-in-new-window/

  • @J.Lo Did this solution work for you? – Sagar Jan 18 '18 at 3:04
  • Unfortunately it did not work in my case. I eneed up adding a breadcrumb to the web part so that there would be some sort of navigation for the intent displaying inside.of the web part. – J.Lo Feb 12 '18 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.