# {{.Params.value}} not working inside the range

**URL:** https://discourse.gohugo.io/t/params-value-not-working-inside-the-range/49068
**Category:** support
**Tags:** taxonomy
**Created:** [March 27, 2024, 7:37am UTC](https://discourse.gohugo.io/t/params-value-not-working-inside-the-range/49068 "2024-03-27T07:37:53Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Pon\_Ranjith\_Kodiyara](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pon_ranjith_kodiyara/32/21950_2.png) [@Pon\_Ranjith\_Kodiyara](https://discourse.gohugo.io/u/Pon_Ranjith_Kodiyara)
#### Post date: [March 27, 2024, 7:37am UTC](https://discourse.gohugo.io/t/params-value-not-working-inside-the-range/49068/1 "2024-03-27T07:37:53Z")

</div>

I don’t know the reason why {{.Params.value}} is not working inside the range

Here the example

```auto
---
title: "Some File"
url: /some-file
author: "Rahul"
breadcrumbs:
 - name: "Trail #1"
   url: "/url-for-trail-1"
 - name: "Trail #2"
   url: "/url-for-trail-2"
 - name: "Trail #3"
   url: "/url-for-trail-3"
---

```

```auto
       {{range .Params.breadcrumbs}}
               <p>{{.name}}</p>
               {{.Params.author}} 
       {{end}}

```

In here why {{.Params.author}} is not works?

---

<div class="post-metadata">

### Author: ![chrillek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chrillek/32/19797_2.png) [@chrillek](https://discourse.gohugo.io/u/chrillek)
#### Post date: [March 27, 2024, 9:15am UTC](https://discourse.gohugo.io/t/params-value-not-working-inside-the-range/49068/2 "2024-03-27T09:15:15Z")

</div>

It’s referring to `Params.breadcrumbs.Params.author` since `range` changes what dot refers to.

---

<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: [March 27, 2024, 2:11pm UTC](https://discourse.gohugo.io/t/params-value-not-working-inside-the-range/49068/3 "2024-03-27T14:11:16Z")

</div>

@chrillek is correct, so what you want is:

```plaintext
{{ range .Params.breadcrumbs }}
  <p>{{ .name }}</p>
  {{ $.Params.author }} 
{{ end }}

```

See [https://gohugo.io/templates/introduction/#context](https://gohugo.io/templates/introduction/#context)

> The most important concept to understand before creating a template is _context_

> Make sure that you thoroughly understand the concept of _context_ before you continue reading. The most common templating errors made by new users relate to context.

---

<div class="post-metadata">

### Author: ![Pon\_Ranjith\_Kodiyara](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pon_ranjith_kodiyara/32/21950_2.png) [@Pon\_Ranjith\_Kodiyara](https://discourse.gohugo.io/u/Pon_Ranjith_Kodiyara)
#### Post date: [March 28, 2024, 6:36am UTC](https://discourse.gohugo.io/t/params-value-not-working-inside-the-range/49068/4 "2024-03-28T06:36:35Z")

</div>

@jmooring and @chrillek , I can use breadcrumb values within the range. However, I also need to access other values such as title, author, and URL within the range. If we can’t access other frontmatter values within the range, we should display an error message, right?

---

<div class="post-metadata">

### Author: ![chrillek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chrillek/32/19797_2.png) [@chrillek](https://discourse.gohugo.io/u/chrillek)
#### Post date: [March 28, 2024, 7:16am UTC](https://discourse.gohugo.io/t/params-value-not-working-inside-the-range/49068/5 "2024-03-28T07:16:15Z")

</div>

Please read @jmooring‘s post again. Carefully. And research „Hugo context“ with your favorite search engine. That should reveal blog entries by Regis which are enlightening.

---

<div class="post-metadata">

### Author: ![Pon\_Ranjith\_Kodiyara](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pon_ranjith_kodiyara/32/21950_2.png) [@Pon\_Ranjith\_Kodiyara](https://discourse.gohugo.io/u/Pon_Ranjith_Kodiyara)
#### Post date: [March 28, 2024, 10:06am UTC](https://discourse.gohugo.io/t/params-value-not-working-inside-the-range/49068/6 "2024-03-28T10:06:12Z")

</div>

thank you so much @chrillek and @jmooring $. helps good learning

---

<div class="post-metadata">

### Author: ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)
#### Post date: [March 30, 2024, 10:06am UTC](https://discourse.gohugo.io/t/params-value-not-working-inside-the-range/49068/7 "2024-03-30T10:06:26Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
