Hi I am using some params to generate a product preview I want
that acctual code in markdown is
recommendation:
- product:
pros:
- pro: 1st Pros
- pro: 2nd Pros
name: MSI MEG GODLIKE Z390
specifications:
- specification: "The Specs of the Motherbaord"
cons:
- con: 1st Con
- con: 2nd Con
- paragraphs:
- paragraph: >-
The 1st Description Paragraph I want to write!
- paragraph: >-
The 2nd Description Paragraph I want to write!
and here’s how I am doing it in my partial file.
<ol>
{{ range .Params.recommendation.product}}
<li>
<a href="">{{.name}}</a>
</li>
{{ end }}
</ol>
There will be multiple product names, specs, pros, cons and paragraphs also.
It returns an error! which is
execute of template failed at <.Params.recommendation.product>: can't evaluate field product in type []interface {}
Please help me fix ASAP!!!