Content Snippets

Content snippets are small chunks of editable content that can be placed by a developer on a page template, allowing for customizable content to populate any portion of a page’s layout easily. Snippet controls, which are responsible for rendering the content of snippets on the web-facing portal, are placed on .aspx pages by developers. For information on how to develop with snippets, see the developer’s guide.

Editing Snippets

Snippets can be edited either through the front-side or through the CRM interface. The main power of the snippet is the fact that you can abstract a bit of content (other than the main copy of the page) and edit it separately allowing essentially any static content on your site to be fully content-managed and front-side editable but still backed by the CRM.

Front-side Editing

To edit through the front-side, hover over the snippet element and click the edit button. You must have website access permissions in order to edit snippets.

When editing a snippet, either a simple text box will appear, allowing you to quickly edit the content…

Or the full editor appears, as it does when editing a page’s copy…

Which of these two interfaces appears is determined by the edit type of the snippet, which also determines the type of content the snippet can hold (full, stylized html content vs. just plain text). A snippet can be assigned an edit type of either text or html when a developer adds the Content Snippet control to the page template in the Portal's Visual Studio project.

Editing through the CRM

To create or edit a content snippet through the CRM:

Navigate to Portals -> Content Snippets

To create a new snippet:

Click New

To edit an existing snippet:

Double-Click on an existing Content Snippet in the grid

Specify the appropriate values for the following fields:

Name

Description

Name

The name can be used by a developer to place the snippet value into a page template within the portal's code.

Website

The website that is associated with the snippet.

Value

The content of the snippet to be displayed in the portal. This can contain plain text or html markup.

A developer must manually add the Snippet Control or Expression to physical page templates in the portal's code in order for the content of the snippet to be rendered in the portal.

Website access permissions

In order to edit snippets on the front-side, user's must be associated with a Web Role that is a associated with a Website Access Permission record with the Manage Content Snippets permission set to true. See the following article for more details regarding security.