Search code examples
sitefinity

Place Sitefinity content block on page


Either I'm absolutely missing something obvious or there's a very bad overlap of terms happening.

I created a "Content Block" under the "Content > Content Blocks" menu. It's a simple piece of text I want to use across several pages. It would be way overkill to create an entirely custom MVC widget for this.

The title even says "Content Blocks shared across pages and templates" - but the "Content Block" widget on the page editor... is a WYSIWYG editor, with no apparent options for choosing the Content Block I had already created. None of the other widgets seem to encapsulate this either...

Searching for instructions is just frustrating. The only references I've found are how to place a "Content Block" widget on the page - annoyingly, this is actually linked from the "Content blocks shared across pages and templates" as a resource, which apparently has nothing to do with that kind of Content Block. Either that or creating another custom MVC widget, which completely defeats the purpose when I just want to replicate two lines of text consistently across the site in several places.

Am I missing something obvious? How do I get this "Content Block" into my page?


Solution

  • A content block created from "Content > Content Blocks" menu is in fact a shared content block. Dragging the 'content block' widget on a page and clicking More -> Use shared will give you a list of "shared" content blocks.

    If you create a content block on a page and then realize you might use it across different pages, clicking More -> Share will share the current content block and add it to the global list under "Content > Content Blocks" menu

    Using the content block widget on templates

    If you want a content block with default text but want CMS users to edit the text on specific pages, you can go to Design -> Page templates, select or create a template, drag the content block widget and select 'Make editable on pages'. This option is available for all widgets giving you some flexibility

    enter image description here