Quantcast
Channel: SharePoint 2013 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 21070

Sharepoint 2013 - Remove "Recent" from left menu

$
0
0

Hello All -

My client has requested that she be able to remove (or hide) the "Recent" menu header from the left menu in Sharepoint 2013. This is for specified site collections/sites/pages, not farm-wide.

So far, I've tried to do this via JQuery by adding the following code

<script type="text/javascript">
jQuery(document).ready(function() {
 jQuery(".ms-core-listMenu-item:contains('Recent')").parent().hide();
});
</script>

via both a script web-part and via a content editor web-part (using embed code), but to no avail. I've also tried adding the code above to a .js file (without the script tags) and calling it as

<script type="text/javascript" src="/_layouts/15/menu.remove.recent.js"></script>

instead, but it still doesn't work.

I've checked the page source and I can see the script is included. The "Recent" menu item however, is still there. My prefered solution would be to hide the menu item rather than remove it - I suspect removing it will probably cause issues as Sharepoint likely expects it to be there.

There's no requirement to use JQuery - it just seemed to me to be the best way. I would also rather not edit master pages unless there's no other choice.

Any ideas?


sysadmin


Viewing all articles
Browse latest Browse all 21070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>