1

I am planning to create a site template where-in I will have lists and document libraries. However I was thinking to make the names of the lists and libraries as dynamic which will pick the name from the site name.

Say for eg. my site name will be Finance. I want that when I create a site from my custom site template, it should create a document library called as "Finance Shared Documents", a links list called as "Finance Links" so on and so forth. My current environment is MOSS 2007 SP2. Please guide whether it is possible and if yes, how?

1 Answer 1

3

What comes to mind to achieve this is to either programmatically create all the lists and control the list names like that, or to create the lists using normal CAML (i.e. using ListInstance) and then use code to update the list names afterwards. Both methods would need code intervention, probably using a Feature Receiver.

If you're planning on creating a site definition (rather than a site template) this is simple enough as you set up which features are activated, which will ensure your code is triggered each time.

If you are going to use a Site Template (i.e. a site saved as a template) this may be a little more awkward in SharePoint 2007 as I'm not sure if your features will be activated when the site is created - it's something you may have to investigate before deciding which approach to use.

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.