src/Ad.js
/**
         * Converts the old product widget configuration into a usable placement configuration
         */
Converts the old product widget configuration into a usable placement configuration
Converts the old product widget configuration into a usable placement configuration
_setCompatibilityOptions() {
            this.config.backwards = 'Ad';
            this.config.type = okanjo.Placement.ContentTypes.products;
            this.config.url = null;
            if (this.config.id) {
                this.config.ids = [this.config.id];
            } else {
                okanjo.warn('Ad widget should have parameter `id` set.');
            }
            this.config.take = 1;
            delete this.config.id;
            delete this.config.content;
        }
_setCompatibilityOptions ( ) { this . config . backwards = 'Ad' ; this . config . type = okanjo . Placement . ContentTypes . products ; this . config . url = null ; if ( this . config . id ) { this . config . ids = [ this . config . id ] ; } else { okanjo . warn ( 'Ad widget should have parameter `id` set.' ) ; } this . config . take = 1 ; delete this . config . id ; delete this . config . content ; }
Converts the old product widget configuration into a usable placement configuration
Converts the old product widget configuration into a usable placement configuration
// Convert the product config to a placement configuration // Id / single mode is now ids // Content is automatically determined whether the placement element contains children