A column type determines how data is stored and displayed in a list or library. You choose a column type when you create a column, and the type that you choose indicates the type of data that you want to store in the column—for example, numbers only, formatted text, a list of choices, or a number that is calculated automatically. Microsoft SharePoint includes three column types unique to publishing sites that enable you to control how rich text, images, and hyperlinks are handled on site pages, lists, and libraries. This article explains how to use them.
In this article
Publishing column types
SharePoint includes three publishing column types. Each is explained in the following table.
Full column name | Short name | Description |
---|---|---|
Full HTML content with formatting and constraints for publishing | Publishing HTML | Enables rich text authoring by specifying font, styles, links, tabular layouts, reusable content, and so on. Helps you manage authoring options by placing content field controls within SharePoint page layouts. You can apply content and formatting constraints to ensure that new content appears according to pre-established styles and themes. Note: Full HTML Field does not support embedding code (such as Script, IFrame, and so on). |
Image with formatting and constraints for publishing | Publishing Image | Enables you to provide metadata about the images used on your site. This metadata includes image path, alt text, hyperlink, image alignment, thumbnail, and rendering size. Provides an easier way for users to add images than manually entering the URL of the image or web reference. You can tighten control over images when you place content field controls within SharePoint page layouts. |
Hyperlink with formatting and constraints for publishing | Publishing Hyperlink | Enables authors to browse to an object and link to it rather than typing a URL. Also provides the option of entering display text and tooltip metadata. You set link formatting and other options when you place content field controls within SharePoint page layouts. |
Note: Publishing must be enabled by a site collection administrator for these column types to appear. To enable publishing, go to Settings > Site Settings. Under Site Collection Administration, click Site collection features. Scroll down to SharePoint Server Publishing Infrastructure and click Activate.
Create the publishing column
Let's start by creating a publishing column. We'll use the Publishing Hyperlink column type for this example.
Note: You must be a site administrator or site collection administrator to add columns to lists and libraries.
-
From the root of your site collection, click Settings > Site settings.
-
Under Web Designer Galleries, click Site columns.
-
Click Create.
-
Give the column a name. For this example, we'll use "Hyperlink."
-
In the list of column types, clickHyperlink with formatting and constraints for publishing.
-
In the Existing group box, select Publishing Columns. This step is optional but can be helpful for organizing columns.
-
Click OK.
Add a publishing column to a content type
Publishing columns based on the Publishing HTML and Publishing Image column types are already part of the Article Page, Enterprise Wiki Page, Project Page, and Welcome Page content types. Publish Hyperlink is not. In this procedure, we'll add our new Hyperlink column, which is based on the Publishing Hyperlink column type, to a content type. The procedure is the same whether the content type is built-in or custom.
Note: You must be a site administrator or site collection administrator to add columns to lists and libraries.
-
From the root of your site or site collection, click Settings > Site Settings.
-
Under Web Designer Galleries, click Site content types.
-
On the Site Content Types page, click the content type to which you want to add the column.
-
At the bottom of the Site Content Type Information page, click Add from existing site columns.
-
On the Add Columns page, in the Select columns from box, click Publishing Columns (or whatever group you chose above).
-
In the Available columns list, click Hyperlink, and then click Add.
-
Click OK.
Now your content type includes the Hyperlink column. When you edit the properties for any new page created from that content type, you'll see the column listed.
Add a publishing column to a list or library
Adding a publishing column to a list or library is very similar to adding one to a content type. In this example, we'll continue to use the Hyperlink column that we created in the first procedure. Whether the list or library is built-in or custom, the procedure is exactly the same.
Note: You must be a site administrator or site collection administrator to add columns to lists and libraries.
-
Navigate to your list or library.
-
On the List tab, in the Settings group, click List Settings. (If you're adding the column to the library, click Library Settings.)
-
Under Columns, click Add from existing site columns.
-
In the Select site columns from box, click Publishing Columns (or whatever group you chose above).
-
In the Available site columns list, click Hyperlink, and then click Add.
-
Click OK.
Now, your list includes the Hyperlink column. When you add an item to the list, you will see the column in the properties page.
For more information about site columns, see Site column types and options.
No comments:
Post a Comment