If isset and range index

i’ve missing something on my code
wrong number of args for isset: want 2 got 1

this is my template

    {{ if isset $.Params.producteur }}
    <h2> La vie locale de {{ .Params.name }}</h2>
    <ul class="list-sharing">
    {{ range first 10 (index $.Params.producteur) }}
      <article itemscope itemtype="http://schema.org/LocalBusiness">
        <h3 itemtype="brand">{{ .name }}</h3>
        <p itemtype="review">{{ .description }}</p>
        <address itemtype="location">{{ .address }}</address>
        <p><a href="{{ .externalLink }}">{{ .externalLink }}</a></p>
    {{ end }}
    {{ end }}


You’ve to separate the index form he collection in order to use isset (see here).

Change your code as follows:

{{ if isset $.Params "producteur" }}