First, the following files are a part of a Portal Site Template:
- \templates\1033\xml\webtemp_myportalsite.xml - all the site templates that are used and pointers to where they configurations my be found
- \templates\sitetemplates\myportalsite\*.* - the site configurations. I've collected all my custom templates in on directory.
- \templates\sitetemplates\mywebmanifests\myportalsite.xml - the portal site definition with all the webs and sub webs which it contains and which sould be provisioned.
- \resources\myportalsite.resx - resources used in the portal site and the site defintions. It's a good idea to use a resource file beacause you then can change titles, descriotions, names, locations, etc without entering the onet.xml file which becomes very large.
- Design the portal site template with all its contents in SharePoint. Build the structure, the web part zones, page layout, master pages, etc. that will be needed. The result of this process is what you then will bring into the Portal Site template. If the structure and content is not well defined when you start it will be more time consuming to do make changes in the onet.xml file.
- Create a "dummy" team site which includes ALL the web part types that you have used in your portal site.
- Run SharePoint Solution Generator on the "dummy" team site to create a site template. The content of this template you can then cut and paste in all the site templates that are included in you owen portal site template. Saves you a lot of time and uneccessary cursing :-)
- Identify all the different site templates that will be needed and enter these into the webtemp_myportalsite.xml file
- Build the portal site structure in the mywebmanifest\myportalsite.xml file
- Build the site templates in the sitetemplates\myportalsite\* catalog and the corresponding onet.xml file
- Adding web parts to the definition. Export the web part from the site and cut and paste the web part data/definition into the onet.xml file.