I want to add 3 different pages (Page1, Page2, Page3) to a custom web template. When I create a site using this web template, I would like the 3 pages Page1, Page2 and Page3 to be created automatically. How do I add these 3 pages to a web Template ?

If its possible to add pages to a custom web template, then where will these pages be created (at which location) ?


This is an awesome guide for learning how to work with WebTemplates and Modules to provision pages, pagelayouts etc.

What you would need to do to provision pages with your WebTemplate is to add a new Module to a feature. In the module you would add your pages and specify where the pages are to be provisioned. Then add the Feature GUID to either Web and Site section in your onet.xml (depending on the scope you choose for the feature)

| improve this answer | |

Your question is not entirely clear. Do you want a code approach or no-code?

With a no-code approach, you can create a site, then add pages to a library in the site. Then you can save the site as a template, including the content. Mind that a site with the Publishing feature enabled cannot be saved as a template through the GUI.

When you create a new site based on that template, the new site will have the pages in the library, just like the template site.

If that is not the approach you want to take, please provide more detail.

| improve this answer | |
  • I don't want to save site as template as you directed. I have already created web template that is already in use. Now, I want to add 3 pages let say, pag1, page2 and page3 into that web template. Now if I create site based on this template, the 3 pages should be created also. How I do this ? – SPBeginer May 22 '13 at 13:46
  • You have not specified if you want code. How did you create the template? Why don't you just create a new site from your existing template, add the three pages, then save that site as a template and let it replace your first template. – teylyn May 22 '13 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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