Email this Page Log Support Call Send Feedback Print

Previous Topic

Next Topic

Book Contents

Book Index

Random Ads

Random ad 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 ads 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, where the advert uses an image, are created by adding the advert 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).

In the Content folder, or language sub folder, you need to create an advert folder to store the HTML files. The Author-it Website Manager function uses the files in the advert folder to call and display the advert in your webpage.

Random adverts can be created from an image or from a block of text, such as a comment or a set of related links. If the advert is created from a block of text the HTML page containing the text is displayed in the ad block and is added to the random adverts folder.

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, ad_block_1, ad_block_2, 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:

placeholder name

randomSelection(placeholder,[number],[orientation])

AWM Function

Note: The number and orientation parameters are optional.

Parameter

Description

folder

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

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. 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 Author-it Website Manager at global, experience, or content level using the following format:

placeholder name

randomSelection(placeholder,[number],[orientation])

AWM Function

To Call the Advert Files:

  1. Create the advert topic in Author-it and publish the book. The images and HTML pages are uploaded to the Content folder on the webserver.
  2. Create an advert folder in the Content folder (create the advert folder inside the language folder if your website has been translated) and move the HTML pages for that advert block to the appropriate subfolder.

See Also

Adding Functionality

Menus

Search

Breadcrumbs

Language Selector

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