none
Is there any way to hide/disable Add new webpart button in page personalization. RRS feed

  • Question

  • Hi,

    One of our client asking us to hide/disable "Add new webpart button " in user page personalization view.
    User only sholud allow to move the webpart location from one zone to other zone,but should not allowed to add new webpart.

    Thanks&Regards
    Karteek
    Tuesday, June 30, 2009 4:12 AM

All replies

  • Hi,

     

    If you want to hide the “Add a web part”, you can overwrite the CSS style “.ms-WPAddButton” in your web part page using SharePoint Designer, the code looks like:

    <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">

    <style type="text/css" >

    .ms-WPAddButton

    {

      visibility: hidden ;

    }

    </style>

     

    Hope it can help you.


    Xue-Mei Chang
    Wednesday, July 1, 2009 8:54 AM
    Moderator
  • Hi,

    Thanks for your reply.

    But if we directly mention it in the main content place holder tag then "add new webpart" is disappearing in personal view, shared view and whenever we click on edit page also it will not appear.

    But our requirement is  "Add new webpart " option should not appear in personalize page only,and "Add new webpart " option should appear in sharedview and edit page .

    Is there any way to dynamically include style tag in main content place holder based on query string because for personal view the query string will be personalview and for shared view the query string will be sharedview .

    Thanks&Regards
    karteek
    Wednesday, July 8, 2009 7:39 AM
  • Thanks a lot for this.

    • Proposed as answer by MilindMilind Tuesday, April 3, 2012 9:55 AM
    • Unproposed as answer by MilindMilind Tuesday, April 3, 2012 9:55 AM
    Wednesday, September 9, 2009 6:30 AM