0

I've created a new Site Definition which does not use Publishing features and I need to have 5 document libraries created by default on the new site created using this Site definition.

The Collab. Team feature gets activated, so I am able to manually create these libraries after a site is created using this Site Definition, however I'm looking for an automated way of doing it.

Is it something I can do through the ONet.xml or do I have to use features with modules?

1 Answer 1

0

Found the answer myself by experimenting a little.

In the ONet.xml file in the <Lists> note create a new <List> note with the following:

<List FeatureId="00bfea71-e717-4e80-aa17-d0c71b360101" 
      Type="101" 
      Title="My Magical Document Library"
      Url="/MagicalDocLib"
      QuickLaunchUrl="/MagicalDocLib/AllItems.aspx" />
5
  • Yepp, this is a way to do it with Site Definitions :) Just a question out of curiosity, is there a reason why you are still using Site Definitions over Web Templates? Jan 3, 2014 at 12:19
  • @RobertLindgren My teammembers have decided to use Site Definitions instead as the needs of the client are very strict and the templates are not to be updated. So the flexibility of the Web Template is not a necessity and it's an on-premise installation.
    – user2536
    Jan 3, 2014 at 12:45
  • Fair enough :) Although it will give you a more complex upgrade process when moving to new SP versions! Jan 3, 2014 at 12:47
  • 1
    @RobertLindgren I agree. Hopefully the upgrade won't be my task!
    – user2536
    Jan 3, 2014 at 12:51
  • Care to explain the downvote?
    – user2536
    Aug 28, 2015 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.