.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Specify content type of page in site definition

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :SharePoint


I wanted to ask. I want deploy my site definition, but I am not able (and I can't find any solution) to make my pages "wiki". I have page default.aspx in my site definition. But If I create new site from this definition, I can't edit default.aspx. I don't know, how define this. I think site definition must create "wiki-lists", but I don't know how. And I think I must create somewhere in default.aspx some Formated content. But I don't know how.

Can someone help me with little push. Or reference on existing answer or solution?


View Complete Post

More Related Resource Links

SharePoint 2007 - Consolidating everything as feature into WSP [Content Type, Page Layout, Pages, Ma


Hello –


Overview – We are building a Mobile Web Site using SharePoint 2007. The big screen site has been already built and we need to integrate the mobile site into same site collection of big screen –


·         The Mobile site will use the existing content types of existing big screen site

·         We will build a new custom Master page

Issue with List Definition of same base content type and deployed via same feature


I am trying to deploy two custom list definitions using only one single feature.  Below are the details of my issue.

  • Two custom list definitions
  • Each custom list definition has its own custom content type
  • Each custom content type inherits from the base content type Picture (Type = 109)
  • The custom list definitions are grouped together under one single feature
  • The custom content types are grouped together under a seperate single feature

When I deploy my solution in this configuration, the second list definition gets the first custom content type applied to it and the list schema from the first list definition is also applied to the second list definition.

What makes this more interesting, when I seperate both of the list definitions under two seperate features it all works fine.  Custom content types and list schemas get applied correctly.

Can anyone tell me why I can not deploy both list definitions under one single feature?

If you need me to post any of the origional code or XML to this post please let me know.



Create buttons for "new item" which create a new page of a specific content type

We have a Pages library (wiki) which supports a few content types (and page layout associated). We want to enable users to click a button for example of "new custom enterprise wiki page" - so a new page of content type article will be open in edit mode. Can someone help how to develop? (it has to mimic the behavior that happens when user creates new page from the Ribbon or Site actions and has to choose the content type, it also has to keep the new page in edit mode and not just create it).  

Create a list definition without a Custom Content Type

is it possible to create a list definition without creating a custom content type?  I want to create a list definition and select "Custom List" and then I just want to add fields to the custom list and not create a content type that will show up in the SharePoint GUI.  Seems like to get the new fields to show up in the new and edit forms I have to add the fields to a custom content type.

Form opening in infopath client despite Content Type settings "Display as a Web Page"

Hi all,   I have a strange behavior with my forms. The infopath template is defined as Content Type for my Form library, in the advanced settings I have checked "Display as a Web page" for the "Opening browser-enabled documents" setting. Despite that when the client is availble on the computer which is browsing the Form Library, I'm asked to "Open", "Save" or "Cancel" instead of opening the form in the browser.   Any idea why this is happening ?

content Type at site collection level using feature.

I m planning to create a feature to install the content type and site colomun at site collection level. Now my doubt is? 1. what will happen when i de activate a feature with documents already there? 2. what will happen when i de activate a feature without documents? What are points i need to take care? 

MySite user profile site creation of My Content page is created as provisioned failed (unprovisioned

I've been trying to troubleshoot our User Profile Sync and have noticed the profile pages weren't getting updated with everything.  Most content was but things like memberships and the content tabs weren't.  I also saw this error in ULS: ProfSynch: Exception attempting to enumerate site 25a72070-4249-4698-ae99-c2a45d25b08e for ContentDB 23a6e3ef-6d56-4bde-825e-95c6924e2f91: Microsoft.Office.Server.UserProfiles.ProfileSynchronizationInternalException: ProfSynch: The site with ID 25a72070-4249-4698-ae99-c2a45d25b08e cannot be synchronized due to an unprovisioned root web.      at Microsoft.Office.Server.UserProfiles.SiteSynchronizerCollection.GetSynchInfoForSite(SqlDataReader dr, SynchInfo info)      at Microsoft.Office.Server.UserProfiles.SiteSynchronizerCollection.<get_Elements>d__0.MoveNext() I checked in the MySite database under the webs table and noticed all the My Content sites for all of our users had the flag column with the number 1315 in them - (meaning unprovisioned as the error above states).  Cross checking with the User Sync Profile database under the SiteSynch table I noticed all of the sites have NULL for the value under both the LastSynch and ChangeToken columns (The User Profile Service Application - User Profile to SharePoint Full Synchronization  timer job takes care of populating that).&

where to specify the master page in site definition?




There are two site definition created. and two master pages for each.

Now when user creates new site definition the respective master pages should be applied automaticaly.

what needs to be done?

Is there any way to populate an InfoPath form field with the data from the site content type column?


I have a Form library with a form template.

The templat has a field "Office name" which should not be a fixed list of values, but a dynamical list, feeded from a different type of form. I'm a novice with InfoPath - Sharepoint and I want to find out, how can I can give users a possibility to create and maintain a list of offices and also have this list as a selection list inside main library form - ALL inside one library, if possible.

I assumed that if I publish main form (Itinerary) as a library template form and lookup form (OfficeInfo) as a SiteContent, I should be able somehow to connect to siteContent column and it's information. But I cannot see how - Site Content Gallery is not appering as a Connection item.

Can I use SiteConenct for this purpose or there are other ways to create end-user lookup lists?

Thank you!


spmetal generated class and content type (for page layout) retrieve problem


I'm working with a console application to generate my sites and subsites (hierarchy). And i've got a problem with a generated spmetal class.


this doesn't work:


static void Main(string[] args)


            string SITE = string.Concat("http://"Environment.MachineName);         



URGENT: Document Library Content Type not inheriting some fields from parent Site Content Type


I have a situation that has foxed me!! I have a site level content type that has 8 fields... I use this to create more content types at the site level and use these in multiple Document Libraries (I have 40 doc libs).  This works fine for 38 of the libraries.  But for 2 of them... 2 of the columns are not showing up on the document libraries.  These are user lookups fields.  I am not sure why it's not working in these libraries only!  When I use the same content type in another library... the inheritance does not break for these fields!

Anyone please provide some guidance on this?  I am using WSS 3.0 and SPD to do workflows.

On another note... the content type has a template (in excel) attached to it.  When I create the content manually using the content type from the New menu option, the template is used... however, when I try to add it using an SPD workflow, it creates a blank template... the content type template is not being used.

Please help... I am in a fix and need to release this application today!!!

Move page in Site Content and Structure alters revision history and makes old content available


This sounds bizzare, I tried it on an OOTB publishing site.

I have a page X in site A. Page X has version 1.0 and 2.0 approved and published, no minor versions anywhere. I choose to move page X to site B. Page X now has revision history version 1.0 (published and available) and version 1.1, which is exactly the same as version 2.0 but no longer visible to the outside world.

So the first problem is that moving a page makes a previously published and overwritten version of the page content available again. If I publish the page it goes to version 2.0, but I have to remember to do this. Also because I approve the page, my user id is associated with the publication of the content (which is sorta ok) but the original author of version 2.0 has now presumably been lost to the ether ... or the green swirling icon of death.

But I don't publish page X because I think "oops I meant to move page Y" and move it back to site A, without first publishing version 1.1. Now I have version 0.1 and 0.2. 0.1 matches the original version 1.0, and version 0.2 matches the original version 2.0, however the best bit is that the timestamps are such that version 0.1 is now checked in after version 0.2.

I then publish the page, I now have version 0.1 and 1.0, where 0.1 matches the original version

Cannot delete certain site column(s) from new content type



I make a new content type, based of event.

If I add the (existing) site columns, Active, Aliases, Article Date, Byline (and some others?), these columns cannot be deleted afterwards!

is there a workaround ? 

Thank you 

P.S. After testing, this also happens in 2007.



Sharepoint 2007 publishing site home page displays unknown file type security message


I am using sharepoint 2007 sp2, it has been workig fine for the past 8 months but since one of the developers installed .net 4.0 framework, every time we create a new sharepoit publishng site or extend and existing application the home url displays an "Unknown File Type" security warning message and asks users to download the file.  If i manually tupe in the full url http://www.mysite.com/pages/default.aspx it is displayed correctly. I have uninstalled .net 4 from the server but i still have the same  error. I have tried to replicate this error on a development server but sharepoitn works fine on that even with .net 4.0 installed.

Has anyone had the same issue ? I would appreciate  any suggestios or help with troubleshootig this issue.


Custom site definition with embeded master page


Hello All,
I am creating a custom site definition, which is based on STS site definition ( so my site is also a team site, just with the difference of name ). For that I have created a SharePoint 2010 site definition project in VS 2010. It works fine.

Now what I want to do is to create a custom master for this site definition. And I want to keep this master page in same project.  Can someone tell me how to do it ?

Note : I am adding a module to this project ( which adds a feature to the project, when there was no module, there was no feature in the project ). Next I am referring that feature in one.xml file under configuration->site feature node. I do not want to have a feature, I want it to be part of site definition. But can I embed in such way that every time a site is created based on my site definition, master page also get deployed to root site of site collection


content editor webparts in site definition



I am new to site definitions

pls let me know details on following

content editor webparts should be loaded on the page in page library .and this page is provisioned with site definition.


Cannot Display Application Page as Custom Form for Content Type



I've created a custom content type in VS. In "Elements.xml" file of my content type, I added my custom application page as new form and deployed as feature.

   <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
    <FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend