Todd Bleeker's 12 Hive

All MindsharpBlogs

Are you pondering what I'm pondering?

My Links

Post Categories

Archives

Blog Stats

Remove built-in Document Library from the Create Page

I received the following excellent question from Pankaj Joshi:

Is there a way to hide the built-in Document Library so that the user can only create a new document library only from Deleted Items Document Library (STS Web).

 

Which files do I need to modify for that. I tried to comment the entry for Document Library in create.aspx page but it didn't work. Do I have to modify some entries in files in 60\TEMPLATE\1033\STS\LISTS\DOCLIB

 

Please suggest.

I could be missing it, but there isn't any evident way to remove the built-in Document Library from the Create page of existing Web's/Area's. You will need physical server access to implement the following solution.

 

If you have implemented CustomJSUrl in a custom Site Definition as per my recommendations in the SharePoint Advisor magazine article then you can drop this code into the custom ows.js file and all Webs/Areas created using your custom site definition will hide this option on every create page.

 

try

{

  //Used to remove the built-in Document Library from the Create page

  var doclibLink = document.getElementById('onetCreate101');

  if(doclibLink)

  {

    //There are three rows to remove from the DOM

    //The row with the link in it and two blank rows that follow it

    doclibRow = doclibLink.parentNode.parentNode;

    doclibRowAfter1 = doclibRow.nextSibling;

    doclibRowAfter2 = doclibRowAfter1.nextSibling;

 

    //Remove all three rows from their parentNode (TBODY of the Table)

    doclibRow.parentNode.removeChild(doclibRow);

    doclibRowAfter1.parentNode.removeChild(doclibRowAfter1);

    doclibRowAfter2.parentNode.removeChild(doclibRowAfter2);

  }

}

catch(e){}

 

If you haven't implemented CustomJSUrl, you can still wrap this code in <script> tags and place it at the bottom of the Create.aspx page and the SPCreate.aspx page in the C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS\1033 directory like this:

 

<script>

try

{

  //Used to remove the built-in Document Library from the Create page

  var doclibLink = document.getElementById('onetCreate101');

  if(doclibLink)

  {

    //There are three rows to remove from the DOM

    //The row with the link in it and two blank rows that follow it

    doclibRow = doclibLink.parentNode.parentNode;

    doclibRowAfter1 = doclibRow.nextSibling;

    doclibRowAfter2 = doclibRowAfter1.nextSibling;

 

    //Remove all three rows from their parentNode (TBODY of the Table)

    doclibRow.parentNode.removeChild(doclibRow);

    doclibRowAfter1.parentNode.removeChild(doclibRowAfter1);

    doclibRowAfter2.parentNode.removeChild(doclibRowAfter2);

  }

}

catch(e){}

</script>

 

HTH,

 

<Todd />

posted on Thursday, October 13, 2005 9:29 PM

Feedback

# re: Remove built-in Document Library from the Create Page 5/31/2008 9:41 AM Youtube

This is just great! thanks

# re: Remove built-in Document Library from the Create Page 6/2/2008 5:39 AM Araba Yaris Oyunlari

You will need physical server access to implement the following solution.
http://www.kiz-oyunlari.com
http://www.futboloyunlari.org
http://www.arabaresim.net

# re: Remove built-in Document Library from the Create Page 6/2/2008 5:40 AM Futbol Oyunları

You will need physical server access to implement the following solution.
http://www.kiz-oyunlari.com
http://www.araba-oyunlari.com
http://www.arabaresim.net

# re: Remove built-in Document Library from the Create Page 6/5/2008 5:53 AM Youtube

thanks

# re: Remove built-in Document Library from the Create Page 7/3/2008 7:21 PM trabzonspor

Great article, thank you.

# çizgi film 8/14/2008 10:06 AM Çizgi Film

very good

# film izle 8/14/2008 10:07 AM film izle

very good

# gelinlikler 8/14/2008 10:08 AM Gelinlikler

very good

# masaüstü resimleri 8/14/2008 10:08 AM masaüstü resimleri

very good

# mercedes yedek parçaları 8/14/2008 10:08 AM Mercedes Yedek Parçaları

very good

# autocad kursu 8/14/2008 10:08 AM autocad kursu

very good

# müzik dinle 8/14/2008 10:10 AM müzik dinle

very good

# Bay 8/14/2008 10:10 AM Havuz

very good

# yemek tarifleri 8/14/2008 10:11 AM yemek tarifleri

very good

# Bay 8/14/2008 10:11 AM havuz

very good

# re: Remove built-in Document Library from the Create Page 8/14/2008 10:11 AM gaziosmanpaşa

very good

Title  
Name  
Url
CAPTCHA
Protected by Clearscreen.SharpHIPEnter the code you see:
Comments