Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm following this article (as well as different MSDN pages) and trying to add some custom template forms to my content type.

I think I'm doing all by the book, but for some reason wont deploy my version of the content type.

Instead of my XmlDocument I get the default one which is:

 <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
      <FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
        <Display>ListForm</Display>
        <Edit>ListForm</Edit>
        <New>ListForm</New>
      </FormTemplates>
    </XmlDocument>

The Display, Edit and New entries are not my own. ListForm is the default.

My .ascx just contains some div with text in it. Just a test. It's in the right place in the CONTROLTEMPLATES folder.

What am I missing? How can I deploy with my custom templates?

share|improve this question

2 Answers 2

up vote 1 down vote accepted
  1. That happened with me whenever there is an issue with your templates. I forgot what was my exact reason but there has to be some issue with your templates.

  2. Also, in order to override the templates, I realized, there is an Inherits attribute set to 'TRUE' in your definition for content type. Set that to 'FALSE' and it will pick your custom templates.

share|improve this answer
    
I'm marking this as the correct answer since the Inherits="FALSE" did the trick (unfortunately you loose the inherited fields so you have to add them by hand...). Seems this is a bug (social.technet.microsoft.com/Forums/en-US/…). –  JohnDoDo Dec 7 '11 at 13:42

I think that you use incorrect rendering template ID. You should specify this id in your template. look at the excample:

<SharePoint:RenderingTemplate ID="CustomContentTypeCreateForm" runat="server">

Then you should use this id in your schema.

<FormTemplates  xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
     <New>CustomContentTypeCreateForm</New>
   </FormTemplates>

In you case, I think, SharePoint looks for ListForm id and takes default template instead of your template.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.