# Ordering Site Sections to Build Dynamic Menu/Navigation in Template

**URL:** <https://discourse.gohugo.io/t/ordering-site-sections-to-build-dynamic-menu-navigation-in-template/28624>\
**Category:** support\
**Created:** [October 2, 2020, 9:22am UTC](https://discourse.gohugo.io/t/ordering-site-sections-to-build-dynamic-menu-navigation-in-template/28624 "2020-10-02T09:22:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sirinath](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/sirinath/32/10619_2.png) [@sirinath](https://discourse.gohugo.io/u/sirinath)\
**Post date:** [October 2, 2020, 9:22am UTC](https://discourse.gohugo.io/t/ordering-site-sections-to-build-dynamic-menu-navigation-in-template/28624/1 "2020-10-02T09:22:04Z")

</div>

I am using:

```auto
{{ range .Site.Sections }}
	{{ .Render "li" }}
{{ end }}

```

I want the ordering to be of a specific order of each section in `_index.md` like `index = 1` will be the 1st section while `index = 2` will be the second page, etc. Is there a way this can be done?

---

<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:** [October 2, 2020, 9:57am UTC](https://discourse.gohugo.io/t/ordering-site-sections-to-build-dynamic-menu-navigation-in-template/28624/2 "2020-10-02T09:57:13Z")

</div>

would try to add **weight** to section frontmatter

content/blog/\_index.md  
+++  
title = “Blog”  
description = “this is my blog”  
weight = 100  
+++

---

<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:** [October 4, 2020, 9:57am UTC](https://discourse.gohugo.io/t/ordering-site-sections-to-build-dynamic-menu-navigation-in-template/28624/3 "2020-10-04T09:57:16Z")

</div>

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