Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Site definitions/templates

  Asked By: Pallavi    Date: Sep 25    Category: Sharepoint    Views: 1259

As part of SharePoint rollout in our company, we are in the process of
developing custom site definitions/templates for team sites, project sites

We understood that new site definitions/templates required configuration (adding
new views to lists, adding webparts to pages etc) can be built in three ways.
They are

Custom site template (do all the required configuration in a site and store it
as .stp file to be used to recreate sites)
Custom site definition (do all the required configuration in onet.xml of a
custom site definition in 12 hive)
Feature ( do all the required configuration in a dll through object model and
attach the dll to Feature, to be called when a new site is created using Feature
site template association)

Instead of preferring option 2. above, we are leaning more towards option 3..
(actually combination of 2. and 3. with bare bones site definiton) as this
would help change the site definition ( by changing the dll) without touching
the site definition files in 12 hive ( best practice from MS is not to touch the
site definition files in 12 hive once site collections are created). This would
help us in the version management of site definitions.

But while preferring option 3., we are facing some challenges in doing the
required configuration (changing some webpart settings) through code.

So, do you have any idea if combination of 1. and 3. will be robust enough? By
combination, I mean doing most of the changes in the custom template (option 1.
above) and include some changes into Feature (option 3.) which are not doable
through custom template.

From the best practice perspective, do you suggest the above combination of 1.
and 3. or you think it is better to go with 2. and 3. (with all the
configuration done through code and just a bare bones site definition in 12 hive
“ this would require more time to resolve our challenges but will prefer if
this is the best way to go.)?

There are various places in the web comparing 1. and 2. but none included all
the three combinations above.



4 Answers Found

Answer #1    Answered By: Katelynn Donovan     Answered On: Sep 25

for developers, (1) is out of question. (1) is for the power users, so that they
may define custom  templates without involving developers.

I would recommend doing (2) and (3)
start with 2 initially, do whatever you can do in (2). Once it goes into
production, start using (3).

You can accomplish every thing with (2) and (3). challenges  could be to
incorporate some ultimate customization by SharePoint designer (but you always
have workarounds for that)

You may publish the challenges you face, I will help  you out as much as I could.

Answer #2    Answered By: Geraldine Slater     Answered On: Sep 25

Just to note............I have found some issues when using method 1. Apparently
some things will not transfer over in your .stp file  and replicate themselves
into your template.

In my case we added a heading and link under Global and Current navigation from
the site  settings UI and neither of them were there after we saved the site as a
template (.stp file) and created  a new site based off of the template.

Answer #3    Answered By: Gail Richmond     Answered On: Sep 25

Another issue we have found with .stp files  is them not capturing all the
information needed at the site  collection level. When we used them to create a
new site collection, we would find it had no web  parts populated in the gallery.
(I don't know if this issue has been fixed in a recent SP.)

On the other hand, they are a quick and reasonably effective way of customising
and deploying sites  without development. I don't see why they can't be part  of
your solution.

Answer #4    Answered By: Ramona Solis     Answered On: Sep 25

Site Templates do not support feature  stapling...

If they want to upgrade any exisitng feature or add a new feature, they have to
manually activate the features on all sites  created by that site  template.

Didn't find what you were looking for? Find more on Site definitions/templates Or get search suggestion and latest updates.