As part of on ongoing project with Radiant CMS, I needed to display random ad banners on a page. The banner_rotator extension didn’t quite fit my needs so I rolled my own. It’s available at http://github.com/davec/radiant-ad_banners-extension.
What’s different from the banner_rotator extension?
- Simplified usage
- Just include
<r:ad_banner/>to generate the appropriate HTML on the page. If you want a specific banner, use<r:ad_banner name="Banner Name"/>. Include as many banners on the page as you want, though if you include more banners than you have defined, the excess ad_banner tags will be ignored. A banner will only be displayed once on a page unless you specifically force it by specifying the name attribute. - Just include
- Uses the paperclipped extension for asset management. Drag-and-drop an image into the form when creating or editing a banner definition.
- Banners are global, not tied to a specific page or set of pages. Depending on your use case, this could be considered a strike against the ad_banners extension.

