Create content with the Articles template page
The sample content provided with Web Content Manager includes a web content template page called Articles that demonstrates how we can build pages with predefined content.
The Articles template page is a managed page containing two web content viewers. These viewers are configured to render content items that are stored in the site area for the page in the Portal Site library.
To create a page based on the Articles template, complete the following steps:
- Navigate to the page where to add the new page.
- Edit the page, click More, and then select either New Child Page or New Sibling Page.
- Use the Create Page window to create the page. Select the Articles template for the new page.
The new page contains the List of Articles web content viewer and the Article viewer:
The Articles template demonstrates several key features of web content page templates:
- The Articles template page contains a system content association to the site area for the template page in the Portal Site library (Portal Site/Content/Content Root/Hidden Pages/Page Templates/Articles. This site area contains three content items that are used as the initial content for pages created from the page template. To see this web content association, edit the page, and then in the site toolbar, click edit in the Web Content field of the Overview tab.
- There are two web content viewers included with the Articles template:
- The List of Articles viewer renders links to all articles stored in page site area.
- The Article viewer renders a specific article that is selected in the List of Articles viewer. The viewer also contributes page metadata to the HTML head section of the rendered portal page.
- The page uses a dedicated theme module (wp_oob_sample_styles) to include the CSS styles required by the rendered content items. To ensure that this theme module is available to pages created from the page template, the template explicitly references the full theme profile. This profile contains the wp_oob_sample_styles theme module. The reference to the full theme profile is specified in the page metadata by the resourceaggregation.profile parameter, with a value of profiles/profile_full.json. When a page is created from the template, this parameter is copied, with all page parameters, to the new page instance.
For more information about theme modules and theme profiles, see Modules.
When creating a page based on the Articles template, several things happen:
- A page is created based on the page template. The new page has the same layout and style as the template and contains copies of the two web content viewers.
- The new page has a system content association to its corresponding portal page site area.
- The content items contained in the site area for the page template are copied into the site area associated with the new page.
- The Articles viewer and List of Articles viewer on the new page automatically render the newly created content associated with the new page. The rendering occurs because of the viewer configuration:
- The configuration of the List of Articles viewer is updated during instantiation to point to the newly generated List of Articles content item.
- The Article viewer is configured to directly retrieve its context from the content association of the containing page.
The Articles page template is a managed page that stores its associated web content in the Portal Site library. If you disable managed pages, the content associated with this template is no longer copied during page instantiation. In addition, the corresponding preferences of the Articles viewer and List of Articles viewer are not adjusted.
Parent: Create content with sample web content template itemsRelated: