Content Re-Use
Often it is necessary to re-use content in numerous places on a site. A common example is having a privacy policy stored in a single location that is re-used across several subsidiary sites with an independent look-and-feel.

This may be accomplished in three different ways in the CMS. Data definition pages in the CMS can include the content of one or more other pages in the system via a data definition page chooser. The first thing you need to do is create a new data definition with the page chooser.
A. Data Definition with Page Chooser
To create a data definition with a page chooser, please do the following:
- Go to the Administration area, and select Data Definitions in the left navigation bar.
- Click on New Data Definition.
- For the Name field, type place page.
- For the XML field, type:
- Click Submit to save your new data definition.

B. Copy Page and Attach Data Definition
With your simple place page data definition complete, you need to attach it to a page.
To copy a page and attach a data definition to the new page:
- Go back to the Home area.
- Click on the desired site in the left asset tree. In our case, we will select our web folder.
- Click on an existing page. In our case, we will select the agents page.
- Select the Copy tab.
- For the new page name, add the number 2 after the existing name. In our case, we will put in agents2.
- Click Submit to copy the page.
- Now you’ll be on the new, copied page. Select the Edit tab.
- On the System pane, check the box that says Use Data Definition.
- Click the browse icon for the Data Definition label, and select /place page as the data definition.
- Click Submit to save the page.
- Click the Edit tab again, and you’ll see the data definition attached to the page.
- In the data definition, click the browse icon for the Page Content label and browse for the original page from which this copied page was created. We will select /web/agents as our page. Click Confirm to record the page selection.
- Now click Submit to save the page change.

In the resultant page, the contents of the page are selected. If you change the original page, the changes will be reflected in this new page. In addition to the page contents, different metadata values also appear at the very bottom because they were supplied by the system XML when using the page chooser.
C. Filter Metadata with XSLT
You can write a simple XSLT that will just show the page content and ignore the additional fields.
To create an XSLT that filters out metadata and only displays the page content, please do the following:
- Select your stylesheets folder. In our case, we will select /web/stylesheets.
- With the folder selected, please click on New -> Default -> Stylesheet in the top navigation menu.
- For the XML field, type:
- Go to the System pane, and for the System Name field, type place page.
- Click Submit to save the new stylesheet.
- In the left asset tree, select the page created earlier that has the data definition. We will select /web/agents2.
- Select the Edit tab and choose the Configurations pane.
- You will automatically be forwarded to the HTML configuration.
- Under the DEFAULT region, click the browse icon to select /web/stylesheets/place page for the Stylesheet. The block can be left blank for the default region because it will be automatically populated with the XML output from the data definition.
- Click Submit to save the configuration changes.

When the resulting screen loads, you will see the placed page content with the metadata values removed. In addition to having the page chooser in the data definition, you could extend the place page data definition in order to allow for more pages or other data capture fields. Having the page chooser in the data definition makes it easy to re-use content across a site or even multiple sites.
D. Data Definition with Block Chooser
This example is similar to the page chooser, but we’ll use a block instead. The first step is to set up a new data definition that allows for inserting a block.
To create a data definition with a block chooser, please do the following:
- Go to the Administration area, and select Data Definitions from the left navigation menu.
- Click on New Data Definition.
- For the Name field, type place block.
- For the XML field, type:
- Click the Submit button to record the new data definition.

E. Create a New Text Block
With your data definition in place, create a new block to be used in the block chooser.
- Go back to the Home area.
- Click on your desired site and folder in the left asset tree. In our case, we will select /web/blocks.
- From the top navigation menu, select New -> Default -> Block.
- Select Text Block, and click Submit.
- For the Text, type This is an example block.
- Under the System pane, type example block for the System Name.
- Click the Submit button to save the new block.

F. Copy Page and Attach Data Definition
Now that your block is ready, you need to attach the new data definition to a page and then choose the new block.
To copy a page and attach a data definition:
- Please select an existing page. In this case, we will choose the /web/about page.
- Click the Copy tab, and type in a System Name for the new page. In this case, we will use the value about2 as our system name.
- Click Submit to create the copy.
- Now, on the resultant page, click the Edit tab and select the System pane to see the page options.
- Check the box for Use data definition.
- Click the data definition browse icon to choose the /place block.
- Click Submit to record the page change.
- Click the Edit tab to use the newly attached data definition.
- Click the browse icon next to the Block Content label.
- Select the newly created block. In our example, we will select /web/blocks/example block.
- Click Confirm to record the selection.
- Click Submit to save the page changes. On the resulting screen, you’ll see the contents of the block, which are displayed inline on the page with metadata.

Data definitions can have multiple page and block choosers, providing an easy method to re-use content in a variety of different ways.
G. Index Block with Inline Page Content
In addition to manually selecting individual pages and blocks to re-use, index blocks can be configured to include the contents of pages and blocks, which provide another mechanism to re-use content in an automated way. For example, if you have a folder of articles, you can use an index block to retrieve all of the contents of the folder and then use XSL to show the content heading with a “read more” link that takes the user to the full article. The first step is to create a new index block that points to the desired folder and includes the contents inline.

To create a new index block with inline page contents:
- Browse to the desired folder in the system. In our case, we will select /web/blocks as our example.
- Click on New -> Default > Block in the top navigation menu.
- Select Index Block, and click Submit.
- For the Index Folder, click the browse icon and select a folder in the system. In our case, we will select /web from the chooser, and click Confirm to record the selection.
- For the Depth of Index field, type in the number 1. This will cause the index block to only return the contents of that folder and not its sub-folders.
- For the Indexed Asset Types, check the box for Pages.
- For the Page XML select the radio button for Render page XML inline.
- For the Index Asset Content, check the boxes for Regular Content and User Metadata.
- Go to the System pane, and for the System Name field, type page listing.
- Click Submit to save the new index block.
On the resulting screen, you will see the XML output for the new index block.
H. XSLT to Filter Index Block with Page Content
With your new index block in place, the next step is to take the XML output and use it in your desired XML/XSL IDE to write a corresponding XSLT.

To create a new XSL to filter the XML output:
- In your browser, view the source of the XML frame from the page listing index block (by right clicking on the mouse, selecting This Frame and then selecting View this Frame) and copy the XML into your XML/XSL IDE. We will copy it into the XML tab in Cooktop on Windows (XMLCooktop.com). In our XML/XSL IDE, we will write our XSLT and test it before bringing it into the CMS.
- In the CMS, browse to your stylesheets folder. We will select /web/stylesheets.
- On the top navigation menu, select New -> Default -> Stylesheet.
- For the XML field, type the following:
- Go to the System pane and, for the System Name field, type page listing.
- Click Submit to save the new stylesheet.
I. Copy Page and Associate Block and Stylesheet
With your index block and stylesheet finished, the final step is to copy a page and associate the new assets.
To copy and associate a block and stylesheet with a page:
- Browse to an existing page. In our case, we will select /web/contact.
- Click the Copy tab, and type in a new name for the copied page. In our case, we will call our page contact2.
- Click Submit to make the page copy.
- On the resulting page, click the Edit tab and select the Configurations pane in order to display available configurations.
- You will be automatically forwarded to the HTML configuration.
- Under the DEFAULT region, click the browse icon to select /web/stylesheets/page listing for the Stylesheet.
- For the Block, click the browse icon to select /web/blocks/page listing.
- Click Submit to save the configuration changes.
- We want to enter a message for any system user who might potentially edit the page for which the default block and stylesheet have been overridden. Click the Edit tab, and select the System pane to show the page options.
- Check the box for Use Data Definition.
- For the first Data Definition label, click the browse icon and select /placeholder. This displays a simple text box notifying a user that clicks edit on the page that the default region has been overridden with a block.
- Now click Submit to save the page changes.

In the main content region, you will see dynamic output re-using content from the pages in the folder in order to create an article listing of the page heading with a link to read more. Index blocks make it easy to incorporate content from anywhere in the system for placement anywhere in the system.