how do i add document library in a site

Hi ,

how can i add a document library called myLibrary to the SPWeb site called mySite

The purpose is that when the user clicks on the site: mySite he will see the document library myLibrary part of Documents section in the site contents section

Thank you.




Answer this question

how do i add document library in a site

  • j2associates

    thank you

  • vec7or

    This can be achieved by modifying ONET.xml and DocumentLibrary.xml.

    For Ex if we want to create an Excel Document Library.

    1. Open ONET.xml (path = C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\SPSPERS\XML\”)

    1. Make an entry under

    <Configurations>

    <Configuration ID="-1" Name="NewWeb"/>

    <Configuration ID="0" Name="Default">

    <Lists>

    <List Title="$Resources:spscore,PersonalSiteOnet_List_ExcelDocuments" Type="103" Url="Excel Documents" QuickLaunchUrl="Excel Documents/Forms/AllItems.aspx" Description="$Resources:spscore,PersonalSiteOnet_List_ExcelDocuments_Description" FeatureId="00BFEA71-E717-4E80-AA17-D0C71B360101"></List>

    </Lists>

    -

    -

    -

    </Configuration>

    </Configurations>

    1. Under file DocumentLibrary.xml (path= C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\DocumentLibrary\ListTemplates)

    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">

    <ListTemplate

    Name="doclib"

    Type="103"

    BaseType="1"

    OnQuickLaunch="TRUE"

    SecurityBits="11"

    Sequence="110"

    DisplayName="$Resources:core,doclibList;"

    Description="$Resources:core,doclibList_Desc;"

    Image="/_layouts/images/itdl.gif"

    DocumentTemplate="103"/>

    </Elements>

    1. Do IISRESET and rebuild MySite.

  • how do i add document library in a site