How to: Remove the Explorer View from a Document Library Template

Posted Thursday, May 29, 2008 1:40 PM by CoreyRoth

If you are building a custom document library solution, there may be a time where you don't want users to use the Explorer View of the document library.  I am talking about the view itself and not the Open with Windows Explorer action in this case.  The correct way to do is of course is to create your own custom document library template (I'll be covering that in a future post) and then modify the schema.xml file.  If you want to go crazy and unsupported, you can also modify the schema.xml of the built-in DocumentLibrary feature and accomplish the same result for the out-out-the-box document library.  Removing it is just a matter of removing the appropriate View element in the schema.xml file.  In this case, you are looking for an element similar to the one below.

<View BaseViewID="3" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,Explorer_View;" Url="Forms/WebFldr.aspx" SetupPath="pages\webfldr.aspx" RequiresClientIntegration="TRUE" ReadOnly="TRUE">

It will have a BaseViewId of 3 and a Display Name indicating that it is the explorer view.  Just delete this entire View element and reactivate the feature and this view will not be present on any new document libraries you create.  Again, I recommend creating your own document library template instead of modifying the built-in one.  I'll cover this soon, since I haven't found too many good sets of instructions out there on how to do it.

Comments

# re: How to: Remove the Explorer View from a Document Library Template

Monday, June 2, 2008 1:43 PM by feeco

Hi Corey, great article! I have a couple quick questions...above you say "If you want to go crazy and unsupported, you can also modify the schema.xml of the built-in DocumentLibrary feature and accomplish the same result for the out-out-the-box document library". --- What exactly is the path to get to that file, just so I modify the correct one? Also, do you have to reset iis or anything for it to work? Will this remove the explorer view from all existing doc libraries or only new ones? Thanks soo much for your help!

# re: How to: Remove the Explorer View from a Document Library Template

Wednesday, June 4, 2008 5:08 PM by CoreyRoth

The default path for the builtin document library is C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\DocumentLibrary\DocLib.  It is a feature (that is hidden) so you would have to deactivate it and reactivate it on any site collection that you would want to use it on.  No IIS reset shouldbe required.  It will only remove it on new document libraries created.  Any existing ones you would have to remove manually from each library.

# re: How to: Remove the Explorer View from a Document Library Template

Thursday, June 5, 2008 7:44 AM by feeco

One last question...Ok, I removed the chunk of code above from the path you listed. Now, can you tell me which item I would need to deactivate and reactivate in each Site Settings. Also, when you go to deactivate an item it gives you the following warning "You are about to deactivate the Team Collaboration Lists feature.

If you deactivate this feature, any user data or customizations associated with this feature might be lost. In addition, any active features that depend on this feature might fail to function.

Deactivate this feature ". Will I loose anything by deactivating and reactivating it? Thank you sooo much for your help!

# Weird toolbar on Custom Document Library &raquo; Andy Burns&#8217; SharePoint Blog

Pingback from  Weird toolbar on Custom Document Library &raquo; Andy Burns&#8217; SharePoint Blog

Leave a Comment

(required)
(required)
(optional)
(required)