0

I am using SharePoint 2010. I have been working with SharePoint for about 2 weeks.

I made a team site and began adding new pages (through Site Actions --> New Page) and I have set up a sample page that I want to use throughout the site.

The page just has some normal text on top and 3 different doc libraries, which I had to first create via Site Actions --> New Library and then insert them into the page.

So, my question is this: I want to create a kind of page template that will automatically create these 3 new libraries immediately, so all they have to do is create a page and start uploading their docs to the page.

I do not want my workers to have to learn all of the steps required in making the 3 types of libraries and inserting them into the page. Any help would be greatly appreciated! I have seen some things about Page Layouts, but nothing in them that allows the creation of new doc libraries.

2
  • Will these steps performed every time you create new team site. or in the team site you just created, you want libraries created every time any new page is added?
    – Unnie
    Jun 20, 2014 at 17:23
  • The latter - in the team site I just created, I want 3 libraries created every time any new page is added (and they have already been inserted into that new page)
    – Megan
    Jun 20, 2014 at 17:30

2 Answers 2

1

To create 3 libraries every time you create a new page will require some development effort.You will have to create an event receiver which gets fired on Item Added event of the page library. See this blog for event receivers.Inside that event receiver add code for following functions;

  1. In event receiver add code to create libraries. Follow this blog for that.
  2. After creating libraries, use Webpart manager class to add list view webpart of those libraries to the page. See this blog for info.
6
  • This seems like a rather complicated process for something SharePoint uses so heavily (libraries and pages). Are you sure there is no easier way?
    – Megan
    Jun 20, 2014 at 17:59
  • @Megan to automate the process some amount of development effort will be required and i cannot think of any simpler way to automate the whole process other than through event receivers.Let me rephrase my answer if it confused you.
    – Unnie
    Jun 20, 2014 at 18:02
  • It's not that your answer confused me - I am just upset that I can't do something simpler! I am new to sharepoint and not a developer. It just seemed like something I would be able to do with a Page Layout or some other kind of page template. Thank you for your answer
    – Megan
    Jun 20, 2014 at 18:08
  • @Megan Page Layout just provides you a layout to design that page . With page layout you can decide the layout of placeholders for adding webparts into thaat page.
    – Unnie
    Jun 20, 2014 at 18:10
  • So I can't add a new page template with empty document libraries the same way there are site templates with empty document libraries?
    – Megan
    Jun 20, 2014 at 19:40
0

One option would be create a site page and create a feature at web level. Sp this feature will deploy you site page and create the document libraries in your site.

This would require some development effort.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.