July 2009 - Posts

SharePoint Site Columns and Content Types via a Feature

A few months ago I recorded a video for TechNet on Using Content Types in SharePoint 2007. This video focused on the end-user experience, creating site columns and content types using the browser. This week a colleague of mine, who is fairly new to SharePoint development, was tasked with building a Feature that would create a couple content types when activated. He wasn’t really sure where to start so I sat down with him to walk through the process I use.

Here are the steps in a nutshell:

  • Prototype out the content types using the browser.
  • Create a Visual Studio project with a feature and two element manifests. One for the site columns and one for content types.
  • Use SharePoint Manager (a free utility from CodePlex) to extract the CAML that defines the site columns and it to your Visual Studio project
  • Add the CAML for the content type, getting the ID from SharePoint Manager and adding the FieldRefs for the site columns that make up the type

Once you’ve gone through the process once, it’s pretty easy to repeat. Check out this video for an end-to-end walkthrough.

Video

Watch the video on Vimeo.

 

Technorati Tags:
Posted by windsor | with no comments

SharePoint, AJAX, the UpdatePanel, Publishing Sites and BlueBand.master

I ran into this issue recently and it took me a long time to Google the answer. I've reposted with what I think is a title that will be more obvious to someone searching for the problem. Basically, web parts that use the UpdatePanel don't work properly in BlueBand.master (and possibly other standard master pages) because the WebPartManager is outside the form tag. Move the WebPartManager and all will be good.

You can find the original post on Gary Bushey's blog.

Posted by windsor | with no comments
Filed under: ,