+

Search Tips   |   Advanced Search

Add sample content with the site toolbar

The sample content provided with the portal includes four preconfigured web content viewer portlets that we can add to a page from the site toolbar. The viewers are configured with the Create content (based on selection) setting so that adding the viewers to a page automatically creates content items on the page. The viewers are available in the site toolbar in the Web Content category of the Content tab.

To use these sample web content viewers, complete the following steps:

  1. Navigate to the page where to add the viewers.

  2. Edit the page, and click Content in the site toolbar.

  3. Click Web Content in the list of categories. This category lists all content viewer portlets that are configured with the Create content (based on selection) setting to copy associated content into the page.

  4. Add the web content viewers to the page by clicking the plus sign (+) or dragging the viewers onto the page. We can also adjust the arrangement of the portlets.

  5. Click Save & Exit.

When we add one of these web content viewers to a page, new content is created. The content items that are referenced in the portlet configuration are copied into the site area specified by the default content association. The portlet configuration of each viewer instance is automatically adjusted to reference the copied content items, so that the viewers render the new content.

To help you better understand what these components are doing, here is a more detailed look.

Article

The Article viewer is a copy of the web content viewer that is customized to render specific content. This approach is common for building web content viewers.

The Article viewer has several notable features:

  • The viewer uses a customized portlet title (Article) instead of the default title to provide contextual information about the content rendered by the viewer. When we are assembling pages and adding web content viewers, taking advantage of details like customized titles is important for orienting users.

  • The viewer is configured to render this content: Template Page Content/Articles/Article. The Template Page Content library is preinstalled with the portal and includes sample content for content templating. In this case, the viewer is referencing the Article content item in the Articles site area. We can see the content reference in the content settings of the Configure mode of the portlet.

  • The viewer is configured to create new content when an instance of the viewer is added to a page. This configuration is specified with the Create content (based on selection) setting in the portlet configuration. Because of this setting, whenever the Article viewer is added to a page, the referenced content item is copied to the site area associated with the page. This site area is identified by the default content association. The viewer can be added multiple times, either on the same page or on different pages. Each instance of the viewer references the dedicated copy of the base content item that was created when the viewer was added to the page.

  • When an instance of the viewer is created, the Content field in the shared settings of the viewer is rewritten to point to the newly created Article item.

  • To ensure that the content item to be rendered can be passed in by other viewers, the viewer is configured to receive links with the setting Other portlet and this portlet. For example, if you click a link in an instance of the List of Articles viewer on the same page, this viewer renders the linked content.

  • The Article viewer also defines preferences that enable the generation of additional metadata for the page, based on the currently rendered article instance. This metadata includes description, keywords, and author.

  • The default presentation template used to render articles (Web Content Templates/Article) includes an authoring tools component. The component enables users to modify the content of individual articles with inline editing. The authoring tools component is hidden automatically when the page is not in edit mode.

List of Articles

The List of Articles viewer provides a content item that has the following features:

  • The content item references a menu in Web Content Manager that renders a list of all articles that are associated with the current page.

  • The List of Articles viewer does not contribute page metadata or a page title. This behavior occurs because the viewer renders a list of items instead of specific content that would determine the semantic content of the page.

  • Because the viewer is rendering a list of items, the viewer is not listening to links that are broadcast from other portlets.

  • The default presentation template used to render lists of articles (Web Content Templates/List of Article) includes an authoring tools component. The component enables users to create an article with inline editing. The authoring tools component is hidden automatically when the page is not in edit mode.

The List of Articles viewer has several similarities to the New Article viewer:

  • The viewer references base content from the Template Page Content library.

  • The viewer is configured to create copies of its referenced content when an instance of the viewer is added to a page.

  • The viewer is configured to broadcast links with the Dynamically select a web content page setting. This configuration results in the List of Articles viewer determining the content that is rendered by other viewers on the same page, such as the Articles viewer.

Rich Text

The Rich Text viewer provides a content item that consists of the name, which is not rendered by default, and a rich text body. The default presentation template used to render rich text (Web Content Templates/Rich Text) includes an authoring tools component. The component enables users to modify the content of the rich text item with inline editing. The authoring tools component is hidden automatically when the page is not in edit mode.

Image

The Image viewer provides a content item that consists of the name, which is not rendered by default, and a reference to an image. The default presentation template used to render images (Web Content Templates/Image) includes an authoring tools component. The component enables users to modify the image reference with inline editing. The authoring tools component is hidden automatically when the page is not in edit mode.


Parent: Create content with sample web content template items

Related:

Create a web content page