Fragments are now the most flexible and optimal way to display content. Through mapping of content a page author can choose how each field of an existing content should be displayed. However, in some cases this flexibility is not needed and it is desirable for page authors to just choose an existing content and have it displayed through an existing template/renderer associated to that type of content.
The purpose of this story is to provide a new out of the box fragment that allows a page author to display any existing web content, blog entry or document. The selection of the content will be done through the fragment configuration, which will allow the page author to browse and search through existing content and select the desired one.
The fragment will also support several different ways to display an specific content type, allowing third party developers to provide their own. When more than one way to display the selected content are available, the page author should be able to select the desired one with a selector in the fragment configuration.
- Given a content page when a page author adds the Content fragment then it should show a message informing the author that a content can be selected and they should be able to select an existing Web Content, Blog Entry or document to display it.
- Given a published content page with an unconfigured Content fragment when the page is viewed then the fragment should be invisible to the end user.
- Given a content page with a Content fragment configured with a content when the content is moved to the Recycle Bin OR is permanently removed then the fragment should not show the content in view mode (as if the fragment was not configured) and a message should be shown in edit mode informing the page author that the content is no longer available.
- For the purpose of this story, the Asset Browser can be used. Although the fragment should not be tied in any way to the asset framework or be limited to AssetEntry objects.
- It is recommended to leverage InfoItemRenderers for the rendering of the selected content. That way third party developers can develop their own ways to render the supported content types.