@cheesemelon First of all, try that piece of code using a category or tag you have defined in your site. I had the problem described in issue 608 – which should be re-opened maybe? – and I managed to get it working using .Page.Url and .Page.Title:
<ul>
{{ range .Site.Taxonomies.tags.CHANGEIT }}
<li><a href="{{ .Page.URL }}">{{ .Page.Title }}</a></li>
{{ end }}
</ul>
However, this example requires to define a template for every single tag/category.
I’d like to define a default taxonomy template which lists all the content for each item in the taxonomy. I guess that I’ll have to use two range loops to achieve that, but I’m afraid that I’m not good enough to make it. I’ll make a try and come back in case I do…
<ul>
{{ range .Site.Taxonomies.tags.CHANGEIT }}
<li><a href="{{ .Page.URL }}">{{ .Page.Title }}</a></li>
{{ end }}
</ul>
Can I make CHANGEIT dynamic.
Use case:
suppose you are visiting a page call a. a page has categories params ['abc']. incase of b page and c page categories params also ['abc']. I mean page a page b & page c all under abc category. So when you visit page a I want to see all 3 pages and make active a page. The solution should be taxonomies centric
if i think about javascript
let obj = {
city: 'dhaka',
country: 'bangladesh',
'hdi': 'low',
}
obj.city // dhaka
obj['city'] // dhaka
let x = 'city'
obj[x] // dhaka
{{ range .Params.tags }} <!-- iterating tags params -->
<li>
<a href="{{$.Site.BaseURL}}tags/{{ . | urlize }}">
{{ . }}
</a>
<ul>
{{$tagName := .}} <!-- set tag term -->
{{ range .Site.Taxonomies.tags.[$tagName] }} <!-- iterating tag term. and how can I make it dynamic-->
<li><a href="{{ .Page.URL }}">{{ .Page.Title }}</a></li>
{{end}}
</ul>
</li>
{{ end }}
I mean
{{ range .Site.Taxonomies.tags.CHANGEIT }}
I mean How can I CHANGEIT dynamically