{{~exec(function() { helpers.var.translations = { offers : data.translations.offers, leo : data.translations.leo } })}} {{#offer}} {{~setVar("template", "offers_custom_offer_list_item")}} {{~setVar("mainColumnClass", "large-9 medium-9")}} {{~setVar("url", data.url)}} {{~exec(function() { var url; if (data.media && data.media[0]) { url = data.media[0].mediaurl; } else { url = helpers.plugins.sv_site.siteConfig.custom[helpers.plugins.sv_site.site].defaultImageUrl } helpers.var.image = { resource : helpers.plugins.cloudinary.createResource({ imageUrl : url }) }; if (data.custom.categorydates && data.custom.categorydates[0]) { helpers.var.redeemstart = data.custom.categorydates[0].redeemstart; } const languagecheck = data.locale_code; console.log(languagecheck) if (languagecheck == 'es-ES') { helpers.plugins.moment.updateLocale('es', { months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'), monthsShort: 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), weekdays: 'Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado'.split('_'), weekdaysShort: 'dom_lun_mar_mié_jue_vie_sáb'.split('_'), weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), longDateFormat: { LT: 'HH:mm', LTS: 'HH:mm:ss', L: 'DD/MM/YYYY', LL: 'D [de] MMMM [de] YYYY', LLL: 'D [de] MMMM [de] YYYY [a las] HH:mm', LLLL: 'dddd, D [de] MMMM [de] YYYY [a las] HH:mm' }, calendar: { sameDay: '[Hoy a las] LT', nextDay: '[Mañana a las] LT', nextWeek: 'dddd [a las] LT', lastDay: '[Ayer a las] LT', lastWeek: '[El] dddd [pasado a las] LT', sameElse: 'L' }, relativeTime: { future: 'en %s', past: 'hace %s', s: 'unos segundos', ss: '%d segundos', m: 'un minuto', mm: '%d minutos', h: 'una hora', hh: '%d horas', d: 'un día', dd: '%d días', M: 'un mes', MM: '%d meses', y: 'un año', yy: '%d años' }, dayOfMonthOrdinalParse: /\d{1,2}º/, ordinal: function (number) { return number + 'º'; }, week: { dow: 1, // Monday is the first day of the week. doy: 4 // The week containing Jan 4th is the first week of the year. } }); helpers.plugins.moment.locale('es'); } else if(languagecheck == 'de-DE') { helpers.plugins.moment.updateLocale('de', { months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), monthsShort: 'Jan_Feb_Mär_Apr_Mai_Jun_Jul_Aug_Sep_Okt_Nov_Dez'.split('_'), weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), longDateFormat: { LT: 'HH:mm', LTS: 'HH:mm:ss', L: 'DD.MM.YYYY', LL: 'D. MMMM YYYY', LLL: 'D. MMMM YYYY [um] HH:mm', LLLL: 'dddd, D. MMMM YYYY [um] HH:mm' }, calendar: { sameDay: '[Heute um] LT', nextDay: '[Morgen um] LT', nextWeek: 'dddd [um] LT', lastDay: '[Gestern um] LT', lastWeek: '[Letzten] dddd [um] LT', sameElse: 'L' }, relativeTime: { future: 'in %s', past: 'vor %s', s: 'ein paar Sekunden', ss: '%d Sekunden', m: 'eine Minute', mm: '%d Minuten', h: 'eine Stunde', hh: '%d Stunden', d: 'ein Tag', dd: '%d Tage', M: 'ein Monat', MM: '%d Monate', y: 'ein Jahr', yy: '%d Jahre' }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal: function (number) { return number + '.'; }, week: { dow: 1, // Monday is the first day of the week. doy: 4 // The week containing Jan 4th is the first week of the year. } }); helpers.plugins.moment.locale('de'); } else if(languagecheck == 'fr-FR') { helpers.plugins.moment.updateLocale('fr', { months: 'Janvier_Février_Mars_Avril_Mai_Juin_Juillet_Août_Septembre_Octobre_Novembre_Décembre'.split('_'), monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), weekdays: 'Dimanche_Lundi_Mardi_Mercredi_Jeudi_Vendredi_Samedi'.split('_'), weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), longDateFormat: { LT: 'HH:mm', LTS: 'HH:mm:ss', L: 'DD/MM/YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY [à] HH:mm', LLLL: 'dddd D MMMM YYYY [à] HH:mm' }, calendar: { sameDay: "[Aujourd'hui à] LT", nextDay: '[Demain à] LT', nextWeek: 'dddd [à] LT', lastDay: '[Hier à] LT', lastWeek: '[Dernier] dddd [à] LT', sameElse: 'L' }, relativeTime: { future: 'dans %s', past: 'il y a %s', s: 'quelques secondes', ss: '%d secondes', m: 'une minute', mm: '%d minutes', h: 'une heure', hh: '%d heures', d: 'un jour', dd: '%d jours', M: 'un mois', MM: '%d mois', y: 'un an', yy: '%d ans' }, dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, ordinal: function (number) { return number + (number === 1 ? 'er' : 'e'); }, week: { dow: 1, // Monday is the first day of the week. doy: 4 // The week containing Jan 4th is the first week of the year. } }); helpers.plugins.moment.locale('fr'); } // Format the dates if (data.custom.categorydates && data.custom.categorydates[0]) { const redeemstart = data.custom.categorydates[0].redeemstart; const redeemend = data.custom.categorydates[0].redeemend; helpers.var.redeemstartFormatted = helpers.plugins.moment(redeemstart).format("LL"); helpers.var.redeemendFormatted = helpers.plugins.moment(redeemend).format("LL"); } })}}
{{!-- Pre-allocates height of image using padding-bottom to prevent height changes on load --}} {{~setVar("width", 414 )}} {{~setVar("height", 275)}} {{~setVar("paddingBottom", (helpers.var.height / helpers.var.width) * 100 + "%")}}

{{title}}

  • {{:~var.redeemstart}} {{~var.translations.offers.valid}}:  {{~var.redeemstartFormatted}} - {{~var.redeemendFormatted}} {{/}}
  • {{:listings}}
  • {{~var.translations.leo.locations}}:  {{#listings}} {{company}} {{!@last}}, {{/@last}} {{/listings}}
  • {{/listings}} {{:categories}}
  • {{~var.translations.leo.categories}}:  {{#categories}} {{categoryname}}{{!@last}}, {{/@last}} {{/categories}}
  • {{/categories}} {{:distance}}
  • {{distance}} {{~var.translations.leo.miles_from_you}}
  • {{/distance}}
{{:~plugins.sv_site.siteConfig.plugins.tripbuilder.active}}
{{/}}
{{/offer}}