# Better term listing

**URL:** <https://discourse.gohugo.io/t/better-term-listing/10261>\
**Category:** feature\
**Created:** [January 29, 2018, 10:36pm UTC](https://discourse.gohugo.io/t/better-term-listing/10261 "2018-01-29T22:36:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![regis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/regis/32/4958_2.png) [@regis](https://discourse.gohugo.io/u/regis)\
**Post date:** [January 29, 2018, 10:36pm UTC](https://discourse.gohugo.io/t/better-term-listing/10261/1 "2018-01-29T22:36:08Z")

</div>

Correct me if I’m wrong, but currently to best way to lists terms (as links) from a certain taxonomy associated to a post is this way:

```auto
{{ range .Params.locations }}
<a href="{{ "/locations/" }}{{ . | urlize }}">{{ . }}</a>
{{ end }}

```

or

```auto
{{ range .Params.locations }}
   {{ $term := $site.GetPage "taxonomy" "locations" (lower .) }}
   <a href="{{ $term.Permalink }}">{{ $term.Title }}</a>
{{ end }}

```

1/ Is there a better way I am not aware of?

2/ Wouldn’t it be possible to generate a list of term object complete with .Permalink and .Title available inside the .Page (.) context.  
So we could use something like this from inside the .Page context

```auto
{{ range .Taxonomies.locations }}
   <a href="{{ .Permalink }}">{{ .Title }}</a>
{{ end }}

```

Hugo knows those Front Matter params are Taxonomies since they are declared in the config file. So it could differentiate the `locations` array from any other Front Matter array and serve them this way.

Is it very complicate or too heavy to implement?

---

<div class="post-metadata">

**Author:** ![ju52](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ju52/32/6749_2.png) [@ju52](https://discourse.gohugo.io/u/ju52)\
**Post date:** [January 30, 2018, 3:34pm UTC](https://discourse.gohugo.io/t/better-term-listing/10261/2 "2018-01-30T15:34:38Z")

</div>

I have a tag list with buttons - this is my list template:

```
{{ define "main" }}
	{{ "<!-- layout/tag/list.html -->" | safeHTML }}
	<article class="post">
	<h1><a rel="full-article" href="{{ .Permalink }}">{{ .Site.Title }} &middot; all tags</a></h1>
	<hr/>
	<div class="row"><span class="tags">
		{{range $name, $taxonomy := .Site.Taxonomies.tags}}
			<a class="tagbutton" href="{{ $.Site.BaseURL }}/tags/{{$name | urlize | lower }}" title="">{{$name}}&nbsp;<sup>{{.Count}}</sup></a>
		{{ end }}
	</div>
	<hr/>
	</article>
{{ end }}
```
