Skip to main content

Posts

Showing posts from January, 2012

Hide SP 2010 Page Layout Metadata - WebControls

In this post I will walk you through the process of adding in “Hidden” metadata to your page layouts so that they are only visible when editing the page. For example if you want to create a news article with categories, start date, end date, keywords, and other metadata that might not be relevant to the consumer then instead of forcing your content authors to create content in the edit mode and then force them to update metadata by editing the page properties why not have them all on the page. This allows for a single page authoring experience. This post also provides the specific field names for the most common SharePoint 2010 base columns and web controls. (Really good stuff) Microsoft.SharePoint.WebControls Namespace Standard columns that are used for most metadata column types. URL: http://msdn.microsoft.com/en-us/library/ms413880.aspx Example: <SharePointWebControls:RichTextField FieldName="MultipleLines" runat="server" /> Microso

SharePoint 2010 Chrome Type CSS Classes

For content authors the ability to stylize web parts with just a few simple clicks is a big win. In some cases you might want to emphasize a web part on the page and make it stand out. There are basically 4 main web part styles/chrome that you can apply to any webpart. You will notice below that the chrome type “None” and “Title Only” do not have a unique class name so they will share the same style. The “None” style simply does not show the web part title. Chrome ( None ): . ms-WPBody { font-size:8pt; font-family:verdana,arial,helvetica,sans-serif; } Chrome ( Title Only ): . ms-WPBody { font-size:8pt; font-family:verdana,arial,helvetica,sans-serif; } Chrome ( Title and Border ): . ms-WPBorder , .ms-WPBorderBorderOnly{ border-color:#9ac6ff; border-width:1px; border-style:solid; } Chrome ( Border Only ): .ms-WPBorder, . ms-WPBorderBorderOnly { border-color:#9ac6ff; border-width:1px; border-style:solid; }