Metadata in Publishing
I will elaborate further on how site columns
and content types play a part in the publishing infrastructure of the
SharePoint platform, to expand on metadata use in SharePoint.
For most intended purposes, you can consider
the core platform of SharePoint as a list management system, which
leverages site columns, content types, and list containers to house
data. No matter whether the data under discussion is documents in a
document library, forms data entered through an InfoPath form, a
calendar event, or a publishing page on a public SharePoint-hosted web
site, they all rely on the basic premise of lists, content types, and
site columns—metadata.
Publishing pages in SharePoint consist of the ASPX files that live in a document library—called pages.
Unlike regular Web Part pages and wiki pages in non-publishing sites,
publishing pages contain no data or markup, just references to a page
layout in the Master Page Gallery, and metadata associated with the
page file. Next time you open the Pages library in SharePoint for a
publishing site, try downloading one of the page files to your local
computer and opening the file with Notepad. You should see that the
file consists mainly of XML references for the page layout and other
publishing infrastructure data—the page will not contain any layout
markup or content.
In Figure 8,
the content type defines the columns that content owners of the page
may edit (either in WYSIWYG mode or as page instance properties in the
list item). The content type is associated with the Pages library—a
list—and the page instance file resides in the library with applied
metadata property values. The page layout resides in the Master Page
Gallery, as another ASPX file, and contains HTML markup for the
presentation of the page. Embedded in the markup are field controls
that map metadata fields in the content type to the layout. When
SharePoint renders the page instance, the platform replaces these field
controls in the layout with the content stored as metadata and
associated with the page instance file in the Pages library.
Without going too far into the specifics of Web Content Management and the publishing infrastructure in SharePoint, the diagram in Figure 8
and the previous discussion give a high-level overview of how metadata
works with publishing pages. The purpose of the model is to abstract
content from presentation, so that content owners may influence content
without concern for presentation (editing the metadata properties of a
page list item), and page designers may work on one or multiple flavors
of page design without requirement to embed content in their templates.
Use of the publishing infrastructure and metadata model promotes not
only content abstraction but also reuse of page design—using the same
template for multiple pages—and the ability to change the visual design
of the site without having to change the content.
Before I leave the topic of metadata in the
publishing infrastructure, it is worth mentioning that the publishing
feature includes a number of new site column types and content types.
The following list describes some of the available site columns for
publishing:
- Full HTML
- Image
- Hyperlink
- Summary Links
- Rich Media
These additional site column types
provide for richer content on publishing pages, aside from the typical
single/multiple lines of text, image, and hyperlink columns in the core
platform. The Full HTML column type is interesting in that it allows
content owners to embed full HTML in content areas on the page. A word
of caution: don’t break best practices here—try not to embed layout or
branding elements with content in full HTML fields, as this tightly
couples content with formatting, which is exactly what page layouts and
content abstraction try to avoid.