Random Listing

Last Updated: 17 Dec 2015

The Asset Listing page allows you to create a list that will randomly show a number of assets from a pool of assets. For example, you can set up an Asset Listing page to randomly display an Image on the home page of your Site.

Bookmarks to the headings on this page:

  1. Example of Setting Up a Random Listing

Example of Setting Up a Random Listing

To see how to set up a random listing, consider the following example.

We want to create an Asset Listing to show a random Image from the Images Folder on the Home page of the Site. To set up this Asset Listing, follow the steps outlined below.

  1. Create an Asset Listing page called Random Image under your Site.
  2. Right click on the Asset Listing page in the Asset Map and select Details. Set the following fields on this screen:
    1. Asset Types to List: select Image.
    2. Root Nodes: select the Images Folder.
    3. List Format: select Random.
    4. Assets Per Page: enter 1. This means that only one Image will be randomly displayed on the page.
  3. Click Commit.
  4. The Image Format Bodycopy
    The Image Format Bodycopy

    Right click on the Asset Listing page in the Asset Map and select Display Formats. In the Customised Asset Type Formats section, select Image from the list and click Commit. An Image Format Bodycopy will be created under the Type Formats Folder in the Asset Map, as shown in the figure to the right.
  5. Right click on the Image Format Bodycopy in the Asset Map and select Edit Contents.
  6. In the WYSIWYG Editor add the keyword replacement HTML IMG tag to display this image. This will show the image on the page.

The WYSIWYG Editor on the Image Format Bodycopy
The WYSIWYG Editor

  1. Right click on the Home page in the Asset Map and select Edit Contents.
  2. Create a Nest Content division on the page. To find out more information on how to do this,refer to the Concepts manual.
  3. Select the Random Images page in the Nest Content division.
  4. Click Commit.

Preview the Home page. A random image will be displayed at the top of the page, as shown in the figure below.

A preview of the nested Random Listing page
A preview of the nested Random Listing Page

When you refresh the page, the Asset Listing will randomly select another Image to show. This may be the same image as it was previously showing.


Previous Chapter Next Chapter