Create custom document library Template and add newly created content type programmatically RRS feed

  • Question

  • I have the following requirement:

    1. Create custom Document library template that has the newly create content type as default.

    2. If possible, delete the Document content type.

    I have done the below so far but failed to achieve:

    1. Create customizable list template.

    2. Added newly created custom content type (via feature receiver) to the list template schema.xml

    3. Set the Custom content type as default in the list template

    On deploying, I do see the new list template, but when I add a document library, it has "Document" content type and does not have the custom content type.

    What am I missing? Can I achieve the above programmatically?

    Any help and sample code is appreciated.

    Tuesday, October 21, 2014 4:28 AM