About this block
The TextFragmentBlock (also called Text Fragment) is a reusable rich-text snippet. You author the content once, give it a stable Slug identifier, and then reference that slug from any page or template in the codebase. When the site renders, the latest published version of the fragment is resolved and rendered in place.
This is useful for content that appears in multiple locations and must always be identical — for example, a legal disclaimer, a cookie policy summary, a standard product warranty statement or a footer note.
Slug naming conventions
Slugs must be lowercase, using letters, digits, dots and dashes only. Recommended pattern: area.descriptor — for example:
legal.cookie-noticelegal.general-disclaimerfooter.sustainability-statementproduct.warranty-note
How it works in code
In Razor templates, a TextFragment is resolved via the fragment service: @fragmentService.Resolve("legal.cookie-notice"). The service fetches the latest published TextFragmentBlock with the matching slug and renders its Body field inline.
When to use vs RichTextBlock
Use TextFragmentBlock when the same text appears on multiple pages and must be identical and centrally managed. Use RichTextBlock when the content is unique to one page.