Banner spaces deprecated
Available spaces
This sections lists default banner options:
Banner spaces | Format options | Width (max.) | Height (max.) | On mobile |
---|---|---|---|---|
Leaderboard (top/bottom) | 320x50 (mobile), 728x90, 970x90 | 970 | 90 | Shown |
Skyscraper (left/right/bottom) | 120x600, 160x600, 300x250, 300x600 | 300 | 1050 | Hidden |
Mail Detail View Leaderboard (top/bottom) | 320x50, 728x90 | 728 | 90 | Shown |
Mail Sent Rectangle | 300x250, 320x50, 320x100, 640x480 | 640 | 480 | Shown |
Portal Billboard | 728x90, 970x90, 800x250 | 970 | 250 | Hidden |
Folder Tree Rectangle | 200x200, 300x250 | 300 | 250 | Shown |
Wallpaper/Skin | see Leaderboard and Skyscraper | Hidden | ||
Portal Widget (Rectangle) | 320x250 | 320 | 250 | Shown |
Logout page | 300x250, 640x480, 1024x768 | 1024 | 768 | Shown |
Inbox Ad | Responsive | Shown |
For convenience, there is a list of banner spaces provided through the utility class. It can be used to iterate over all spaces:
util.spaces.forEach(function (space) {
ext.point(space).extend(/* … */);
});
Extension points
There is a list of extension points defined, which can be used to place banners. All points share a similar API:
ext.point('the/spaces/name').extend({
cleanup: function (baton) { /* do some cleanup */ },
draw: function (baton) { /* append baton.data.html to the spaces element, do other stuff */ },
reload: function (baton) { /* trigger a reload of the banner */ }
defaults: function (baton) { /* add default values to baton.data, like for sizes or size mappings */ }
});
The following banner spaces are pre-defined:
- io.ox/ads/leaderboard
- io.ox/ads/skyscraper
- io.ox/ads/folder
- io.ox/ads/portalBillboard
- io.ox/ads/mailDetail
- io.ox/ads/mailList
- io.ox/ads/mailSentOverlay
- io.ox/ads/logout
In order to activate one of these spaces, a configuration is necessary.
Default values
The implementation of the banner space extension points provides a defaults method that can be invoked to get some default configuration values. The results will be stored in the data section of a Baton object. The current implementation allows to fetch default sizes and size mappings (mappings of screen space to banner sizes, see GPT documentation for details) for all banner spaces. Those can of course be customized by implementing a custom defaults
method for each banner space extension. These sizes contain tested values, which are known to work quite well in AppSuite context.
Example
var defaults = ext.Baton.ensure({
sizes: [],
sizeMappings: []
});
ext.point('io.ox/ads/leaderboard').invoke('defaults', undefined, defaults);
console.log(defaults.data.sizes, defaults.data.sizeMappings);
Besides sizes
and sizeMappings
, many spaces define default values for the showInModules
configuration attribute.