# Create a series list view and a post list view

**URL:** <https://discourse.gohugo.io/t/create-a-series-list-view-and-a-post-list-view/40473>\
**Category:** support\
**Created:** [September 11, 2022, 9:51am UTC](https://discourse.gohugo.io/t/create-a-series-list-view-and-a-post-list-view/40473 "2022-09-11T09:51:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![derm\_dorm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/derm_dorm/32/16070_2.png) [@derm\_dorm](https://discourse.gohugo.io/u/derm_dorm)\
**Post date:** [September 11, 2022, 9:51am UTC](https://discourse.gohugo.io/t/create-a-series-list-view-and-a-post-list-view/40473/1 "2022-09-11T09:51:13Z")

</div>

I’m trying to create two pages. One that lists all the posts that have the parameter `intro` set to `true` and the other one lists all the pages that doesn’t have the parameter `intro` set to `true`.

I’m currently thinking of adding `series` or `posts` parameter to the `_index.md`, but I was wondering if there was a better way.

If not, how would I do this?

PS: Sorry if my terminology isn’t correct because I’m just starting to get into hugo.

---

<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:** [September 11, 2022, 7:50pm UTC](https://discourse.gohugo.io/t/create-a-series-list-view-and-a-post-list-view/40473/2 "2022-09-11T19:50:47Z")

</div>

File structure:

```nohighlight
content/
├── posts/
│ ├── post-1.md
│ └── post-2.md
├── views/
│ ├── posts-intro-not-set-to-true/
│ │ └── _index.md # layout = 'posts-intro-not-set-to-true' 
│ └── posts-intro-set-to-true/
│ └── _index.md # layout = 'posts-intro-set-to-true'
└── _index.md
layouts/
├── _default/
│ ├── baseof.html
│ ├── home.html
│ ├── list.html
│ └── single.html
└── views/
    ├── posts-intro-not-set-to-true.html
    └── posts-intro-set-to-true.html

```

Try it:

```bash
git clone --single-branch -b hugo-forum-topic-40473 https://github.com/jmooring/hugo-testing hugo-forum-topic-40473
cd hugo-forum-topic-40473
hugo server

```

---

<div class="post-metadata">

**Author:** ![derm\_dorm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/derm_dorm/32/16070_2.png) [@derm\_dorm](https://discourse.gohugo.io/u/derm_dorm)\
**Post date:** [September 12, 2022, 1:11am UTC](https://discourse.gohugo.io/t/create-a-series-list-view-and-a-post-list-view/40473/3 "2022-09-12T01:11:06Z")

</div>

Unfortunately, this doesn’t work. Here’s my current directory structure:

```auto
.
├── config.toml
├── content
│ ├── posts
│ │ ├── intro-to-note-taking-with-latex.md
│ │ ├── note-taking-with-latex-part-1.md
│ │ ├── note-taking-with-latex-part-2.md
│ │ ├── note-taking-with-latex-part-3.md
│ │ ├── note-taking-with-latex-part-4.md
│ │ ├── note-taking-with-latex-part-5.md
│ │ └── note-taking-with-latex-part-6.md
│ └── views
│ ├── posts
│ │ └── _index.md
│ └── series
│ └── _index.md
├── layouts
│ └── views
│ ├── posts.html
│ └── series.html
├── README.md
└── themes
    └── LoveIt

```

I’m using the [LoveIt](https://github.com/dillonzq/LoveIt) theme. You can find my source code [here](https://github.com/SingularisArt/Website) in case you need more information.

In addition, how can I make the `series` page display something like this:

```auto
Series Name 1:
  - Post Intro
  - Post 1
  - Post 2
  - Post 3

Series Name 2:
  - Post Intro
  - Post 1
  - Post 2
  - Post 3

Series Name 3:
  - Post Intro
  - Post 1
  - Post 2
  - Post 3

```

---

<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:** [September 12, 2022, 1:59am UTC](https://discourse.gohugo.io/t/create-a-series-list-view-and-a-post-list-view/40473/4 "2022-09-12T01:59:27Z")

</div>

> [@derm\_dorm](#):
>
> this doesn’t work

What doesn’t work? The example I provided works exactly as you described.

---

<div class="post-metadata">

**Author:** ![derm\_dorm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/derm_dorm/32/16070_2.png) [@derm\_dorm](https://discourse.gohugo.io/u/derm_dorm)\
**Post date:** [September 12, 2022, 2:01am UTC](https://discourse.gohugo.io/t/create-a-series-list-view-and-a-post-list-view/40473/5 "2022-09-12T02:01:11Z")

</div>

NVM. I found my problem. I was putting the `series` and `posts` into `content` instead of `content/views/`. Thanks.

---

<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:** [September 14, 2022, 2:01am UTC](https://discourse.gohugo.io/t/create-a-series-list-view-and-a-post-list-view/40473/6 "2022-09-14T02:01:33Z")

</div>

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