How to use product tags to populate accordion panels

Hey there!

I’ve created an accordion on my product page but want to be able to adjust the content inside one of the panels based on which tags I use. For example, I have a section called “Take me to” which I want to be populated with text saying either “take me to the beach” or “take me to the pool” based on which tags I’ve used (so if I use “beach” then the content inside the panel will be “take me to the beach”). Does anyone know how I can do this?

Here’s the HTML/liquid:


      

        {{ product.description }}
        
  

      

        {{ pages.fitandcare.content }}
  

      

        {{ pages.sustainability.content }}
  

      

        (HERE is where I want I need to add the tag-based code)