Shortcode parameter in if statement [solved]

well that was easy, scratch to the rescue.

Here is what works:

  {{ $.Scratch.Add "servicetype" (.Get 0) }}
      {{ range .Site.Data.products.items }}
      {{ if eq .featured ($.Scratch.Get "servicetype") }}
          <div class="service-flexitem">
           <a href="{{.url}}">
             <img alt="" src="/assets/img/icons/{{.icon}}" class="img-responsive-hm">

           </a>
           <div class="service-text">
             <a class="servicea" href="{{.url}}"><h3 class="serviceh2">{{.title}}</h3></a>
             <p>{{.description}}</p>  
           </div>
         </div>
         {{ end }}{{ end }}
2 Likes