“List Tools” tab is no longer available after adding webpart to the page

后端 未结 4 1216
终归单人心
终归单人心 2021-02-06 09:37

in SharePoint 2010 I have added my webpart above list (standard list or documents library list - it doesn\'t matter). After this \"List Tools\" tab is not visible. After some di

4条回答
  •  清歌不尽
    2021-02-06 10:13

    When you add a web part to the standard list views, the page is no longer classified as a list view page, but instead it is classed as an application page.

    This means you lose the ribbon menu, as well as the view selector in the breadcrumb.

    UPDATE

    You can see the code that hides the view selector in:

    Microsoft.SharePoint.WebControls.ListTitleViewSelectorMenu.SingleWebPartPresentOnPage

    But I can't seem to find the code that hides the ribbon.

    UPDATE

    Okay i think this will work, add a content editor web part with this code:

    
    

    Replace the MSOZoneCell_WebPartWPQ2 id with the web part zone cell of the list view web part.

提交回复
热议问题