Email this Page Log Support Call Send Feedback Print

Previous Topic

Next Topic

Book Contents

Book Index

Random Adverts

Random advert functionality can be used to add rotating adverts, or graphics, to a webpage. Each time a new page is viewed, or the current page refreshed, the advert is changed. Instead of showing one or more static adverts you can use the random adverts functionality to cycle through a group of adverts or images. As an example, we use this functionality on our website to cycle through a selection of advert and message blocks, increasing the information we are able to deliver to visitors.

Random ads

Random adverts using images are created by adding the advert's image file to an Author-it topic, then publishing and uploading the files to the webserver. When the book is published the image file and HTML file (used to call the advert) are uploaded to the Content folder (if you have translated your website the files are uploaded to the language sub folder).

To display the advert you must create a sub folder for each advert block within the language folder. Move the HTML files for the adverts to the new sub folder, while leaving the image files with the main content. The random advert code uses the files in the sub folder to call and display the advert in your webpage.

You can display several advert blocks on the same page. To do this, add a placeholder for each block in the template (identifying each block by naming it, for example, ads1, ads2, etc), create a folder for each block, and reference the appropriate block in the placeholder value.

Tip: Create advert blocks for different types of adverts, for example, image-based ads, comments, etc.

In Website Manager define the placeholder value at global, experience, or content level using the following format:

Random Advert Code

Note: The parameters for the number of adverts displayed from a folder and the orientation are optional.

Parameter

Description

folder

Defines the name of the advert sub folder containing the HTML files, for example, "ads1".

number

Determines the number of items to display on the page from that folder at any one time.

Although this parameter is optional it should be defined, for example, "1". If no parameter is defined then up to 10 items from the folder may be displayed at any one time.

orientation

Determines whether the ads are displayed as "vertical" or "horizontal".

The orientation parameter is optional but defaults to "vertical" if not defined.

To Add Random Advert Functionality:

  1. Add the placeholder to the template at the appropriate location.
  2. Define the placeholder value in Website Manager at global, experience, or content level.

To Call the Advert Files:

  1. Create the advert topic in Author-it and publish the book. After publishing, the images and HTML pages are uploaded to the content folder on the webserver.
  2. Create a sub folder in the content folder for each block of adverts. Move the HTML pages for the advert block to the appropriate sub folder. Leave the image files with the content uploaded from Author-it.

See Also

Adding Functionality

Menus

Search

Breadcrumbs

Language Selector

Experience Selector

Top of Page Email this Page Log Support Call Send Feedback Print