Solved

Sharepoint template galley

Posted on 2010-09-02
5
371 Views
Last Modified: 2012-05-10
I have wrote event handler for site creation ,user will raise site request , concern person will approve the request ,once request is approved site get created .

For these process i used team site template sts01...but my requirement is when user is creating  request by creating Item in List that time he should able to select site template from list field , in list field sharepoint all site template should get populated to select so when approver is approving the request site will create by that particular template  


can someone hepl me or guide me .Thanks.
0
Comment
Question by:sandipkharde
  • 4
5 Comments
 
LVL 3

Expert Comment

by:ukiran
Comment Utility
Another alternative is to use a workflow to achieve, what I'm understanding to be, an interface to select a site template.
Coding an event handler could be a solution if you didn't have the requirement to prompt the user for an action.  
0
 
LVL 8

Author Comment

by:sandipkharde
Comment Utility
thing is that when request is coming to approval that time aprover should able to project template site as per project ?

can you pls  collaborat how can i do this things with workflow or eventhandler?
0
 
LVL 8

Accepted Solution

by:
sandipkharde earned 0 total points
Comment Utility
Hi ,

I managed by following code, only thing is when i am adding anu custom template  i have to add that template title in choice field of list.

Thnaks.sandip
//Create a Subsite

                            string ParentUrl = properties.ListItem.Web.Url;

                            SPSite ositecollection = new SPSite(ParentUrl);

                            SPWeb mysite = ositecollection.OpenWeb();



                            string siteTitle = properties.ListItem.Title;

                            string siteUrl = ParentUrl + "/" + siteTitle;

                            string siteDescription = "Test";

                            string sitetemplate = sTemplate + ".stp";

                            SPWeb newWeb = mysite.Webs.Add(siteTitle, siteTitle, siteDescription, 1033, sitetemplate, true, false);

                            newWeb.AllowUnsafeUpdates = true;

                            newWeb.BreakRoleInheritance(false)

Open in new window

0
 
LVL 8

Author Comment

by:sandipkharde
Comment Utility
second thing when you are uploading custom template that custome template should be with .stp extn,
0
 
LVL 8

Author Comment

by:sandipkharde
Comment Utility
second thing when you are uploading custom template that custom template should be with .stp extn,
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now