Views: 4295
Last Modified: 10.10.2012

A site may have several different advertisement types and advertising areas. Such advertisement may include both common image-based and text-based banners. Advertisement can be shown on continuing basis as well as its shows can be regulated by the administrator-assigned probability. Advertisement shows can be restricted to certain sections or pages of the site. Advertisement management is implemented with use of the "Advertising and banners" module tools.

All banners are shown in special site template areas called "advertising areas".

Banner show is implemented with use of the function ShowBanner():

<?
//--- Example of placing an advetising area in the left part of the design. 
//--- Any other type can be selected similarly:
//--- TOP, BOTTOM, COUNTER,… (first parameter of the function)
//--- Both predefined and user-defined types can be used. 
//--- Other two optional parameters can be used to specify the HTML code 
//--- that is to wrap the advertising area.

$APPLICATION->ShowBanner("LEFT", '<div align="center">', '<br></div><br>');
?>

For each advertising area it is defined what type of advertisement is available for show in this area. In example (that is given above) only banners with type LEFT will be available for show in this advertising area.



Courses developed by Bitrix24