# Calling a variable with a dynamic name (aka how to make a navigation menu different per section using front matter)

**URL:** <https://discourse.gohugo.io/t/calling-a-variable-with-a-dynamic-name-aka-how-to-make-a-navigation-menu-different-per-section-using-front-matter/19842>\
**Category:** support\
**Created:** [July 27, 2019, 4:00pm UTC](https://discourse.gohugo.io/t/calling-a-variable-with-a-dynamic-name-aka-how-to-make-a-navigation-menu-different-per-section-using-front-matter/19842 "2019-07-27T16:00:23Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![LunaticMuch](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/lunaticmuch/32/9164_2.png) [@LunaticMuch](https://discourse.gohugo.io/u/LunaticMuch)\
**Post date:** [July 28, 2019, 5:07pm UTC](https://discourse.gohugo.io/t/calling-a-variable-with-a-dynamic-name-aka-how-to-make-a-navigation-menu-different-per-section-using-front-matter/19842/6 "2019-07-28T17:07:58Z")

</div>

@bronze you’re right, it doesn’t work in that way 😀  
@zwbetz if I understand right, the index wants to have a config file in /data/something/.

I’ve doing some test and researches, let me try to reformulate.  
I want to make a site where there’s a navigation menu which is contextual per section. As I want this to be fully configuration, I’m looking to make it work using the front matter, rather than coding something static in the template.  
Really, the navigation menu should just display pages available in the section itself. A workaround approach, (which I’ve tried but I am sure can work) is described here: [SOLVED: List pages in sub-section](https://discourse.gohugo.io/t/solved-list-pages-in-sub-section/14146)  
The drawback of this approach is that pages will be listed alphabetically (cause I reckon there’s no way to force an order) and it will display _all_ pages.

The menu template doesn’t allow any .Section parameter so my need to ‘compose’ the call with a variable (.Section).

---

_[View the full topic](https://discourse.gohugo.io/t/calling-a-variable-with-a-dynamic-name-aka-how-to-make-a-navigation-menu-different-per-section-using-front-matter/19842)._
