# List taxonomy tags of current section

**URL:** <https://discourse.gohugo.io/t/list-taxonomy-tags-of-current-section/16638>\
**Category:** support\
**Created:** [January 25, 2019, 2:08pm UTC](https://discourse.gohugo.io/t/list-taxonomy-tags-of-current-section/16638 "2019-01-25T14:08:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ohlser](https://avatars.discourse-cdn.com/v4/letter/o/65b543/32.png) [@ohlser](https://discourse.gohugo.io/u/ohlser)\
**Post date:** [January 25, 2019, 2:08pm UTC](https://discourse.gohugo.io/t/list-taxonomy-tags-of-current-section/16638/1 "2019-01-25T14:08:40Z")

</div>

Hi all,

I’ve been trying to figure out how to list the tags i have for a current section.

this code gives me compiling error

```
<ul id="tags-single">
<li>Tags:</li>
{{ range .CurrentSection.tags }}
  <li><a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a> </li>
{{ end }}

```

`ERROR 2019/01/25 14:56:44 Failed to render pages: render of "section" failed: "c:\code\hugobootstrap\hugobootstrapvanilla\themes\bis\layouts\case\list.html:32:28": execute of template failed: template: case\list.html:32:28: executing "main" at <.CurrentSection.tags>: can't evaluate field tags in type *hugolib.Page`

My content is listed under /content/case and /content/blogg

My wish is when i go to either of those list pages i can show the tags associated with their respective section.

The md files looks like this for example:

```
---

title: "Case1"

date: 2019-01-22T14:51:45+01:00

draft: false

categories: ["case"]

tags: ["Html","CSS"]

---

Ett random case

```

I have tried with this code but it lists all the tags for the entire site. How would i do to only show the tags under category “case” for example?

```
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
              {{ with $.Site.GetPage (printf "/tags/%s" $name ) }}
                  <li><a href="{{ .Permalink }}">{{ $name }}</a></li>
{{ end }}
{{ end }}
```

---

<div class="post-metadata">

**Author:** ![qddtdlko](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/qddtdlko/32/13743_2.png) [@qddtdlko](https://discourse.gohugo.io/u/qddtdlko)\
**Post date:** [August 21, 2021, 12:19pm UTC](https://discourse.gohugo.io/t/list-taxonomy-tags-of-current-section/16638/2 "2021-08-21T12:19:31Z")

</div>

use this:

```auto
{{ range $taxonomyname, $taxonomy := where .Site.Taxonomies.categories ".Page.Section" .Section }}
    <li><a href="{{ "categories/" | relLangURL}}{{ $taxonomyname | urlize }}">{{ $taxonomyname }}</a></li>
{{ end }}

```

or see [How to list all tags of section?](https://discourse.gohugo.io/t/how-to-list-all-tags-of-section/32146)

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [August 21, 2021, 2:32pm UTC](https://discourse.gohugo.io/t/list-taxonomy-tags-of-current-section/16638/3 "2021-08-21T14:32:40Z")

</div>


