Good morning,
I have the following structure
- /data/product category01/product1.yaml
- /data/product category01/product2.yaml
- /data/product category01/product3.yaml
- /data/product category02/product1.yaml
here are the data stored that do not change per language.
my /content folder structure looks like this:
- /content/product_category/product1/index.en.md / index.de.md / index.fr.md
and so on.
here are the data that change per language
Now I have my product.html file and I want to access the data from .md and .yaml files depending on which product is called.
I thought I could solve this in an intelligent way
{{ define "main" }}
<div class="product">
{{$titlename := .Page.Title}}
{{$range := "$.Site.Data.product."}}
{{$info := ".Info"}}
{{$group := slice $range $titlename $info}}
{{range $group }}
{{.Name}}
{{end}}
</div>
{{ end }}
But that doesn’t work.
What am I doing wrong? And is there possibly a much better way to build the structure?