Skip to content

Commit 0b7e7be

Browse files
committed
feat(unbxdSearch.js) - add support for html banners
1 parent dd16278 commit 0b7e7be

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

unbxdSearch.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,12 +1560,16 @@ var unbxdSearchInit = function(jQuery, Handlebars){
15601560

15611561
bannersToDraw = banner.banners.slice(0, this.options.bannerCount)
15621562
.reduce(function(prev, curr){
1563-
return prev.concat(this.compiledBannerTemp(
1564-
{
1565-
landingUrl: curr.landingUrl,
1566-
imageUrl: curr.imageUrl
1567-
}
1568-
));
1563+
if(curr.hasOwnProperty('bannerHtml') && curr['bannerHtml']) {
1564+
return prev.concat(curr.bannerHtml);
1565+
} else {
1566+
return prev.concat(this.compiledBannerTemp(
1567+
{
1568+
landingUrl: curr.landingUrl,
1569+
imageUrl: curr.imageUrl
1570+
}
1571+
));
1572+
}
15691573
}.bind(this), []);
15701574

15711575
jQuery(this.options.bannerSelector).html(bannersToDraw.join(''));

0 commit comments

Comments
 (0)