SharePoint Online: Hide Recycle Bin from Quick Launch
Requirement: Hide Recycle bin from SharePoint Online Quick Launch
How to Hide Recycle bin in SharePoint Online?
Recycle bin link was not relevant for site visitors as they can't delete from site or restore from Recycle bin and we wanted to hide the recycle bin from the Quick launch in SharePoint Online.
Case 1: Hide Recycle bin from quick launch in Classic SharePoint UI
If you are using classic experience sites in SharePoint Online sites, you can hide the recycle bin from quick launch of a particular page with this CSS. Just edit the page, Add a script editor web part and place this CSS in it.
CSS to hide recycle bin in SharePoint Online:
<style type="text/css"> #sideNavBox a[title="Recycle Bin"] { display:none!important } </style>
This hides the recycle bin link from quick launch navigation of a specific page. If you want to do it at the site level, you can either edit the master page and place the above CSS under:
<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server" />
Otherwise, you can use "Alternate CSS" from Master page settings of the site.
Case 2: Remove Recycle bin from quick launch in Modern SharePoint Online Sites
If you have modern site, you can remove "Recycle bin" link from quick launch (or any link in left navigation) with the help of "Navigation" option of SharePoint publishing feature. First make sure you have Publishing server feature enabled at both Site collection and at site level.
- Go to Site Settings >> Click on Site Collection Features >> Activate "SharePoint Server Publishing Infrastructure" feature. It takes a moment to activate the feature.
- Once activated, Click on "Site Features" link from site settings >> Activate "SharePoint Server Publishing" feature.
- Go to Site settings >> Click on "Navigation" under "Look and Feel"
- Now, you can select and delete any link from the current launch navigation.
- Click the OK button to save the changes to the navigation.
You can also add the link https://yourtenant.sharepoint.com/sites/your-site/_layouts/15/RecycleBin.aspx to the navigation and set audience targetting to show recycle bin only to specific user or group!
I was kind of looking for this! I was able to turn off quick launch navigation successfully, but Recycle Bin remained. But thanks to this, solved now! Thanks for sharing.
ReplyDelete