Wednesday, September 5, 2012

Removing Recently Modified


In SharePoint 2010 we all are familiar with the following annoying quicklaunch menu:
image
In SharePoint 2010, the recently modified items is one of many less-used feature. In software industry we are familiar with 80-20 principal. If 80% custom wants a feature then we should go with it and if you can satisfy 80% users then you have the successful product. I guess the ‘Recently Modified’ quick link doesn’t even needed by 10% people but the link is enable by default. Maybe this is a security feature to let administrator know what files have been modified recently. But there should have an on/off option as this is less wanted feature and most of the administrators want to hide this link. Justin has already found a way to hide the option by modifying template file asdescribed in his blog. However, we can fix the issue without modifying the shared file. Specially in case of shared hosting we don’t want to modify the files from 14 hive. The two approaches described here is implemented by modifying master page. The first approach is acceptable but may have unknown side effects. On the other hand second approach is much better and less chance of side effects.

In order to solve this problem, here is my approach:

As shown in the following screen, the ‘recently modified’ quick launch uses a css class named ‘s4-recentchanges’ (shown with firebug).
image
So we can another property ‘display:none’ to the same css class by adding the following extra attribute to master page’s header section:
<style type="text/css">
    .s4-recentchanges
    {
        display:none;
    }
</style>
You can even put the above section in a css file and refer the file in master page. The following image shows the master page with the css class:
image

If you have any problem, just let me know.

Enjoy!

No comments:

Post a Comment