Pages

Wednesday, March 7, 2012

SharePoint 2010 - Page lay-out and Managed Metadata column

I was having issues with a new page lay-out and displaying a managed metadata column. The column got displayed like this:

CustomTag_0:TaxonomyFieldControl

This prevented my page to load correctly. I found this great article from Dave Perkinson:

http://underthehood.ironworks.com/2010/03/sharepoint-2010-how-tos-embedding-managed-metadata-page-fields-in-your-page-layouts.html

The problem is that your page layout is missing the requisite assembly reference to include the Taxonomy Picker control. You can fix this problem by adding the following reference to the top of your page layout:


<%@ Register Tagprefix="Taxonomy" Namespace="Microsoft.SharePoint.Taxonomy" Assembly="Microsoft.SharePoint.Taxonomy, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>"

This worked like a charm! Thanks Dave :-)

I also found the following solution:
http://blog.degree.no/2011/01/sharepoint-2010-adding-taxonomyfieldcontrol-to-custom-page-layout/


<%@ Register Tagprefix="Taxonomy" Namespace="Microsoft.SharePoint.Taxonomy" Assembly="Microsoft.SharePoint.Taxonomy, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
Then change the <CustomTag_0:TaxonomyFieldControl> to <Taxonomy:TaxonomyFieldControl> and off you go (remember there is a closing tag too, by the way..):
<Taxonomy:TaxonomyFieldControl FieldName="81d247d1-0373-4a2d-9e81-d4b69bf3e091" runat="server"></Taxonomy:TaxonomyFieldControl>

0 replies:

Post a Comment