KB Version:

Learning Levels

Most Read

Announcements RSS Feed of Announcements

Display Recent Press Releases

A common use of the system is to show the most recent press releases issued on a site. The demo site doesn’t have a press releases section, but we’ll create a temporary example by walking through the process. The first step is to set up an index block of the press releases folder.

display recent press releases

A. Create an Index Block of Press Releases

Be sure you are still in the web site context. If not, select web from the top sites menu.

To create an index block of press releases:

  1. First, create the press releases folder (refer to Technical Intro Part 1 on How to Create a New Folder). In our case, we will create press-releases.
  2. Browse to your index blocks folder. In our case, we will browse to blocks/index.
  3. Click on New -> Default -> Block in the top navigation menu.
  4. Select the Index Block radio button, and click Submit.
  5. For the Index Folder field, browse to your press releases folder. In our case, we will choose press-releases. Click Confirm to approve the selection.
  6. For the Depth of Index, type in 1.
  7. For the Index Asset Types, check the box for Pages.
  8. For the Index Asset Content, check the boxes for Regular Content and User Metadata.

    index block pr

  9. Now go to the System pane. For the System Name field, type press releases.
  10. Click Submit to save the new press releases index block.
  11. The new index block won’t have any content if there aren’t any pages in the designated folder. Copy several pages into your press releases folder. In our case, we will copy about and agents into press-releases. Note that pages used in an index block need to have the option Include when indexing turned on in the respective page system menu choices, otherwise they won’t show up in the index blocks.
  12. With the pages copied in, navigate back to your press releases index block. In our case, we will navigate to blocks/index/press releases. You should now see the page metadata in the XML preview.

B. Create a Recent Press Releases XSLT Format

Now that the index block and the pages are in place, you need to create a new XSLT format to transform the XML into our desired snippet of HTML.

To create a recent press releases format:

  1. Browse to your formats folder. In our case, we will browse to formats.
  2. Click on New -> Default -> Format in the top navigation menu.
  3. For the XML field, type in the following:

    The format outputs a heading, recent press releases, and then matches all of the system pages. If the page is one of the first four in the folder (according to the folder positioning) and isn’t the 'index', then a link is created to the press release with the title metadata value and the summary metadata value shown below.
  4. Click on the System pane and type recent press releases for the System Name field.
  5. Click Submit to save the new format.

C. Override a Region at the Page Level

Now that you have your press releases index block and format, you need to plug them in to a page region. You are going to override the context navigation region specified by the configuration set with your recent press releases.

To override a region block and format at the page level:

  1. Browse to the desired page. In our case, we will choose index.
  2. Click the Edit tab.
  3. Select the Configurations pane in order to see the existing configurations. Because HTML is the default configuration, it will already be shown in the pane along with all available regions and any current assignments.
  4. Click the browse icon for the CONTEXT-NAVIGATION Block, and select your new press releases index block. In our case, we will select blocks/index/press releases.
  5. Click the browse icon for the CONTEXT-NAVIGATION Format, and select your new recent press releases format. In our case, we will select formats/recent press releases.

    override region

  6. Click Submit to save the page.

The resulting page shows the new recent press releases area, displaying the appropriate press release links. In our case, the about and agents pages appear. However, no summary shows up below the links, because that field is blank in the page metadata. We can fill in summary metadata for both pages in the press releases folder, and then the index page will reflect these changes. The recent press releases format should be customized further to fit in with your site look-and-feel, but this provides a nice starting point.

override region 2

 


Thanks for going through Part 3 of the Technical Introduction. Part 4 is available online:

  • Learn how to use external links, set up RSS feeds, and create advanced data definitions

Videos