Dynamic home page collection based on button click = true

andrewrazaly
New Member
3 0 0

Hi,

I am trying to implement a div container where buttons that are clicked populate the corresponding collection. I have seen some websites use aria-label=false and then when clicked set to true. I have also seen others use a paginator type method. 

my best effort is the following:

<div>

<button>Sale</button>

{% if collection.handle == 'sale'%}

{% include 'list-collections-template' | collection.sale %}

{% endif %}

<div>

I haven't included the onclick button function as I'm trying to seperate the task completion.

I have tried so many others but nothing seems to work. 

 

0 Likes