0

I'm very new to Sharepoint. I'm trying to remove a web part without deleting the contents, however, there is no "close" option available and I'd prefer not to delete the web part. Why isn't the close option available? The only available options are delete, minimize, and edit web part.

If I can't close the web part, will deleting the web part also delete the information held within the site contents, or will that data still be preserved?

I also can't "hide" the webpart as that box is greyed out.

This is on Sharepoint 2010. Suggestions?

0

Each WebPart has a unique GUID. If you inspect the page on which you have the WebPart you should be able to see the id of the WebPart. which looks something like this one

enter image description here

MSOZoneCell_WebPartctl00_ctl44_g_1cc06633_ad23_41a9_9005_a32963a825a8

Once you find out the id of the WebPart you want to hide You can hide the WebPart with JQuery like this.

$('#MSOZoneCell_WebPartctl00_ctl44_g_1cc06633_ad23_41a9_9005_a32963a825a8').hide(); 

OR

$('#MSOZoneCell_WebPartctl00_ctl44_g_1cc06633_ad23_41a9_9005_a32963a825a8').css('display','none');

Your WebPart will be hidden and also without deleting the contents.

When you delete a WebPart you dont loose any SiteContent.

  • Thank you for the response sam! The web part I'm trying to hide is an announcements box. So it's not just the web part itself, but all the content within that announcements box, too. I tried hiding the web part using the method you selected above. The web part was hidden, but all of the content was still there. Is there another way to hide the content, too? Thanks again! – NewToSharePoint Nov 17 '16 at 0:38
  • May be the id that you are using to hide has only the title of the webpart. You need to look for the Guid which contains everything i.e. Title + content of the announcements list in your case. I have tried it on announcements list and it works fine. – sam Nov 21 '16 at 0:53
0

Which webpart you are trying to close ? Is it custom webpart or OOTB webpart ?

You can also try below url which will list down all the webparts added on particular page.

http://yourdomain/sites/pages/yourpage.aspx?Contents=1

You just need to add querystring "Contents=1" at end of any page and this will list down all the webparts added on this page. you need to checkout page before and then click on any webpart displayed and use close button on top. This should close the webpart in question.

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.