Welcome

Login with my
existing account

Sign in with other identity provider (Microsoft Live ID, Yahoo, Google, etc.).

Login with my
boldbrick.com account

 
 

I forgot my password

Live support
Close Login | Register
Hello Guest

BoldBrick Official Blog

Using the Content Types and Properties Refactoring Tool in Mossquito 2009

Using the Content Types and Properties Refactoring Tool in Mossquito 2009

Content types are a valuable resource for grouping related fields together and using these field groups in your lists. SharePoint adds flexibility to your use of content types by allowing you to specify either custom controls (.ascx files) or custom pages (.aspx files) to use when adding, editing or displaying the fields in a content type. But what if you had a fairly large number of lists using a particular content type and wanted to assign different forms for add, edit and display according to the list. Wouldn't it be great if you could assign the appropriate form to each list in a single view and deploy these settings to each of your sites in a matter of minutes? This is where Mossquito 2009's new Content Types and Properties refactoring tool can help.
To see this tool in action I'm going to continue with the example I introduced in a previous blog where a number of Invoice lists are arranged by geographic region. (See Editing field properties with new site column and field refactoring tool in Mossquito.) To store the contact information for these invoices, I’ve created a content type called ClientContactInfo. What I would like is to use this content type for each of my invoice lists but have different add and edit controls based on the list's region. I'd also like to have a redirect to a URL for the display page where I can completely customize the display of the contact information. To accomplish this I first create controls with the fields for add and edit according to region and give them suitable names (e.g. USContactInfoNew, EUContactInfoNew, AsiaContactInfoEdit). For the display pages, I create new web pages according to region and add them to the _layouts folder (e.g. /_layouts/EUContactInfoDisplay.aspx). Once my custom controls and pages are in place, I simply bring up the data model in Mossquito, select my content type at site-level and open the Content Types and Properties Refactoring tool. Here, as shown below, I can edit the content type's properties for each list specifying the control or page to use for new, edit and display forms. With the correct property settings in place I deploy the data model and the job is done. My SharePoint site will now bring up the desired form according to the region of the invoice list.



Comments
Hmm, no comments yet. Go on, express yourself!