Skip to content

Instantly share code, notes, and snippets.

@molotow11
Last active January 1, 2021 20:10
Show Gist options
  • Save molotow11/ddeaf2d5acb5c6c0c6411ec1e450bd15 to your computer and use it in GitHub Desktop.
Save molotow11/ddeaf2d5acb5c6c0c6411ec1e450bd15 to your computer and use it in GitHub Desktop.
usf.js file modification for add banners
<template v-if="view === 'grid'">
<template v-for="(p, key) in result.items">
<!-- added for collections banner -->
<div :class="\'grid__item collection-banner\'" v-if="window.banner1_position == key" v-html="window.banner1_layout"></div>
<!-- banner 2 -->
<div :class="\'grid__item collection-banner\'" v-if="window.banner2_position == key" v-html="window.banner2_layout"></div>
<!-- /// -->
<usf-sr-griditem :product="p" :result="result"></usf-sr-griditem>
</template>
</template>
<template v-else>
<template v-for="(p, key) in result.items">
<!-- added for collections banner -->
<div :class="\'grid__item collection-banner\'" v-if="window.banner1_position == key" v-html="window.banner1_layout"></div>
<!-- banner 2 -->
<div :class="\'grid__item collection-banner\'" v-if="window.banner2_position == key" v-html="window.banner2_layout"></div>
<!-- /// -->
<usf-sr-listitem :product="p" :result="result"></usf-sr-listitem>
</template>
</template>
@molotow11
Copy link
Author

searchResults: part modified at line 156:184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment