Solved

team site definition in VB

Posted on 2011-02-18
2
383 Views
Last Modified: 2012-05-11
I created one team site definition in VB. i have been deploy it in Sharepoint site after that I'm not see it in   Sharepoint site & workspace .
0
Comment
Question by:manich
2 Comments
 
LVL 5

Accepted Solution

by:
navdeepmadan earned 500 total points
Comment Utility
It's an xml file. please check if you have deployed the file c:\program files\commonfiles\Microsoft shared\web server extesion\12\Template\SiteTemplates. Please let me know if you are talking about the custom site defination :-

Steps to create a custom site definition:-
Creating a site definition from scratch in SharePoint 2007 is very easy. Built-in WSS templates saves time. Let's first assume that you want a custom Team Site:-

Step 1: Copy an existing Site Definition. Navigate to the \12\Template\SiteTemplates directory (the 60 hive is dead; long live the 12 hive). Copy the 'Sts' folder and rename it - say 'CUSTOMSITE' for this example. Next, find the WEBTEMP.XML folder in \12\Template\1033\Xml. Open it in Notepad and add a new Template node to the end, like so:
< Template Name="CUSTOMSITE" ID="1001" >
< Configuration ID="0" Title="Custom Web Site" Hidden="FALSE" ImageUrl="/_layouts/images/stsprev.png" Description="Customized site definition for My Team Site" DisplayCategory="Collaboration" > < /Configuration >
< /Template >
* Note: Set your Template ID to something greater than 1000 and the first Configuration node should always start with '0'.

Step 2: Create the WEBTEMP XML fragment file to register the Site Definition with SharePoint.
Step 3: Reset IIS
Step 4: Create a site based on the custom Site Definition.
Step 1: Clone an existing Site Definition.  
Navigate to the following directory on the SharePoint server in Windows Explorer:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates
Copy the STS directory and paste it back into the same directory.
Rename the Copy of STS directory to SAMPLE
Navigate to the following directory on the SharePoint server in Windows Explorer:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033
Copy the STS directory and paste it back into the same directory.
Rename the Copy of STS directory to SAMPLE
Step 2: Create the WEBTEMP XML fragment file to register the Site Definition with SharePoint.  
Create a file called WEBTEMPSAMPLE.XML in the following directory:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\XML
Put the following XML into the WEBTEMPSAMPLE.XML file:
<?xml version="1.0" encoding="utf-8" ?>
<!-_lcid="1033" _version="12.0.4017" _dal="1" -->
<!-_LocalBinding -->
<Templates xmlns:ows="Microsoft SharePoint">
<Template Name="SAMPLE" ID="10001">
<Configuration ID="0" Title="Sample Site" Hidden="FALSE" ImageUrl="/_layouts/images/stsprev.png" Description="This sample template creates a site for teams to create, organize, and share information quickly and easily. It includes a Document Library, and basic lists such as Announcements, Calendar, Contacts, and Quick Links." DisplayCategory="Custom Site Definitions" > </Configuration>
<Configuration ID="1" Title="Sample Blank Site" Hidden="FALSE" ImageUrl="/_layouts/images/stsprev.png" Description="This sample template creates a Windows SharePoint Services-enabled Web site with a blank home page. You can use a Windows SharePoint Services-compatible Web page editor to add interactive lists or any other Windows SharePoint Services features." DisplayCategory="Custom Site Definitions" > </Configuration>
<Configuration ID="2" Title="Sample Document Workspace" Hidden="FALSE" ImageUrl="/_layouts/images/dwsprev.png" Description="This sample template creates a site for colleagues to work together on documents. It provides a document library for storing the primary document and supporting files, a Task list for assigning to-do items, and a Links list for resources related to the document." DisplayCategory="Custom Site Definitions" > </Configuration>
</Template>
</Templates>  
*Note: The DisplayCategory attribute of the <Configuration> element dictates which tab the configuration will appear on in the Template Selection section of the create site web page. You can create your own tabs by putting your own values in this attribute (like we have done here).
Save the file.
Step 3: Reset IIS
Open a command prompt on the SharePoint server.
Type in the command: iisreset
Wait for IIS to reset
Step 4: Create a site based on the custom Site Definition.  
Open Internet Explorer
Navigate to the Sites Directory in your SharePoint portal (http://SharePointServerName/SiteDirectory)
Click the Create Site Link
Fill out the information on the form.
Notice at the bottom of the page in the Template Selection section the new Custom Site Definitions tab.
Click this tab and select one of the available configurations.
Click the Create button.
In this case, not only does the ONET.XML file determine what Features are provisioned as part of the site, there are also Features which determine what goes into a site that have nothing to do with the site itself - they are system Features that SharePoint uses when provisioning all sites.
To make sure that your new Site Definition has all the right pieces and parts, navigate to the \12\Template\Features\BaseSiteStapling folder and open BaseSiteStapling.xml in Notepad. It should look something like this:
< Elements xmlns="http://schemas.microsoft.com/sharepoint/">
< FeatureSiteTemplateAssociation Id="B21B090C-C796-4b0f-AC0F-7EF1659C20AE" TemplateName="STS#0" / >
< FeatureSiteTemplateAssociation Id="B21B090C-C796-4b0f-AC0F-7EF1659C20AE" TemplateName="STS#2" / >
< FeatureSiteTemplateAssociation Id="B21B090C-C796-4b0f-AC0F-7EF1659C20AE" TemplateName="MPS#0" / >
< FeatureSiteTemplateAssociation Id="B21B090C-C796-4b0f-AC0F-7EF1659C20AE" TemplateName="MPS#1" / >
< FeatureSiteTemplateAssociation Id="B21B090C-C796-4b0f-AC0F-7EF1659C20AE" TemplateName="MPS#2" / >
< FeatureSiteTemplateAssociation Id="B21B090C-C796-4b0f-AC0F-7EF1659C20AE" TemplateName="MPS#3" / >
< FeatureSiteTemplateAssociation Id="B21B090C-C796-4b0f-AC0F-7EF1659C20AE" TemplateName="MPS#4" / >
< FeatureSiteTemplateAssociation Id="B21B090C-C796-4b0f-AC0F-7EF1659C20AE" TemplateName="WIKI#0" / >
< FeatureSiteTemplateAssociation Id="B21B090C-C796-4b0f-AC0F-7EF1659C20AE" TemplateName="BLOG#0" / >
...
Take note of the first child node - it defines a Feature (in this case, the BaseSiteFeatureTitle) to be included with the site identified by the TemplateName setting. Does this setting look familiar? It should, as it's the same as the STS (WSS Team Site) < Template > node in WEBTEMP.XML. The #0 after it refers to a specific < Configuration > child node. Since your new Site Definition needs to behave exactly as the STS definition does, you must create a < FeatureSiteTemplateAssociation > for each Feature that STS is associated with, like so:
< FeatureSiteTemplateAssociation Id="B21B090C-C796-4b0f-AC0F-7EF1659C20AE" TemplateName="CUSTOMSITE#0" / >
Simply go through BaseSiteStapling.xml and each time you see an ID associated with STS#0 add an entry for CUSTOMSITE. But wait, you're not done. You now have to do the same thing in the PremiumSiteStapling.xml file located in \12\Template\Features\PremiumSiteStapling folder and, if you want the included workflows, do the same in FeatureStapling.xml in \12\Template\Features\StapledWorkflows folder.
Perform another IISRESET and create a new Site Collection based on your custom Site Definition. Now, when you edit the site in SharePoint Designer, you will see all the right files in /_catalogs/masterpage, such as DefaultLayout.aspx, AdvancedSearchLayout.aspx, SearchMain.aspx, etc.
0
 

Author Closing Comment

by:manich
Comment Utility
no additional comments!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A question that is asked often, is how to generate sequential numbers in InfoPath Forms. The best way to achieve this is to use a SQL database, along with a stored procedure and a web service to connect Forms Services to the DB. The first thing t…
Work Over Net is a new and very powerful collaboration product. With its new easy interface it is becoming very competitive to other similar products like webex and office interactive. WON 2010 have the standard business tools needed for multi-offic…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 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

13 Experts available now in Live!

Get 1:1 Help Now