MOSS Answers

 
Home » Forum » MOSS       Ask a questionRSS Feeds
  Question Asked By: Ramsey Mcleod   on Jun 16, 2010 In MOSS Category.

 
Question Answered By: Brittni Harding   on Jun 16, 2010

My approach would be to create a special render control and generate the required HTML code via the control.

1) Create a render control and override the RenderFieldForDisplay method. For an example, see http://msdn2.microsoft.com/en-us/library/aa981226.aspx. This article shows also how to create the custom edit mode but you don't need all of it.
Deploy the custom control as mentioned in the article.

2) Add the contentplaceholder in the master  page (as you already tried), or use the default

<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/>

Place this in the <head> section, right after the <title> tag for example.

3) Call the custom control to render the meta  description field in the page layout:

<asp:Content ContentPlaceholderID="PlaceHolderAdditionalPageHead" runat="server">

<PublishingWebControls:EditModePanel runat="server" id="displayModeMetadata" PageDisplayMode="Display" SuppressTag="true">
<Mytag:HeadMetadataFieldControl FieldName="MyMetadatafieldname" runat="server"></Mytag:HeadMetadataFieldControl>
</PublishingWebControls:EditModePanel>

</asp:Content>

Tagged:              

 
 
Didn't find what you were looking for? Find more on Meta tags in MOSS 2007 master pages Or get search suggestion and latest updates.