Austin Marketing Company

Edit Content
Click on the Edit Content button to edit/add the content.

A chain of fragments.

Strictly speaking, an XhtmlString property is, in fact, a string at heart. But it is a string made up of special segments that must be interpreted. These segments are more accurately known as Fragments, each of which are instances of IStringFragment. These snippets represent a number of things that an editor can embed inside an XhtmlString: HTML/static text: The plain old text is rendered in StaticFragments. These snippets are not necessarily full HTML, but substrings of HTML. A static fragment can stop at the beginning of an href attribute value, if the link in that href is a permalink. These fragments, for the most part, do not require special processing.
  • Links to content: Links to content within the CMS are UrlFragments. These snippets have a URL property that represents the permalink of the linked content. If you’ve ever seen links rendered on the front-end that start with /link/ and contain an embedded GUID, they are likely permalinks that aren’t resolving correctly.
  • Embedded Content: Editors can drag blocks and page partials into the XhtmlProperty editor. These blocks are represented as ContentFragment instances. The snippet will give you the content GUID, content link, display option, and more.
  • Custom Content – Editors can customize blocks in the XhtmlString property in the same way that they can in content areas. These custom sections are rendered as Custom Content Fragments. From these snippets, you can get a list of roles (groups of visitors) this section targets, and a collection of child snippets that represent the content to display to those roles.
  • And more! There is a DynamicContentFragment if, for example, you still use dynamic content.
The snippets here are really just scratching the surface of how XhmlStrings are processed and indexed. And the same goes for content areas, which are actually specialized XhtmlStrings.