{{~exec(function() { helpers.var.t = { lsitings : data.translations.lsiting, leo : data.translations.leo } })}} {{#listing}} {{~exec(function() { var url; if (data.media_raw && data.media_raw[0]) { url = data.media_raw[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 }) }; })}}
{{!-- Pre-allocates height of image using padding-bottom to prevent height changes on load --}} {{~setVar("width", 328)}} {{~setVar("height", 218)}} {{~setVar("paddingBottom", (helpers.var.height / helpers.var.width) * 100 + "%")}}

{{%title}}

    {{!-- uses a partial mechanic to simplify HTML generation so it's consistent between the li's --}} {{~setVar("fields", [ { name : "location", label : helpers.var.t.leo.location, value : data.location || helpers.plugins.miscLib.varLookup(data, "listing.title"), extra : { url : helpers.plugins.miscLib.varLookup(data, "listing.url") }, valueTemplate : "link_or_label" } ])}}
{{:~plugins.sv_site.siteConfig.plugins.tripbuilder.active}}{{/}}
{{/listing}}