# .Site.RegularPages.Related and current post

**URL:** <https://discourse.gohugo.io/t/site-regularpages-related-and-current-post/40547>\
**Category:** support\
**Created:** [September 15, 2022, 1:29pm UTC](https://discourse.gohugo.io/t/site-regularpages-related-and-current-post/40547 "2022-09-15T13:29:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Welsh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/welsh/32/16693_2.png) [@Welsh](https://discourse.gohugo.io/u/Welsh)\
**Post date:** [September 15, 2022, 1:29pm UTC](https://discourse.gohugo.io/t/site-regularpages-related-and-current-post/40547/1 "2022-09-15T13:29:36Z")

</div>

Hi there

In my [project](https://gitlab.com/Welsh44/genealogie-docs) I use in the theme a partial for the series, based on `.Site.RegularPages.Related`.

I’d like to have the current page in the partial. But `.Site.RegularPages.Related` doesn’t include the current page.

An example :  
Here [Août 1914](https://histoire.gallois.info/documents/pepites/journal/191408/) (the page for Août 1914) you have `Sur le même sujet` which contains

```auto
Juillet 1914
Septembre 1914
Octobre 1914
Novembre 1914
Décembre 1914

```

and I’d like to have the current page :

```auto
Juillet 1914
Août 1914
Septembre 1914
Octobre 1914
Novembre 1914
Décembre 1914

```

The partial code is here : [hugo\_site/themes/welsh/layouts/partials/related.html · main · Fred GALLOIS / genealogie-docs · GitLab](https://gitlab.com/Welsh44/genealogie-docs/-/blob/main/hugo_site/themes/welsh/layouts/partials/related.html)

Have I missed something ?

Thanks in advance

Welsh

---

<div class="post-metadata">

**Author:** ![nfriedli](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/nfriedli/32/26027_2.png) [@nfriedli](https://discourse.gohugo.io/u/nfriedli)\
**Post date:** [September 15, 2022, 2:59pm UTC](https://discourse.gohugo.io/t/site-regularpages-related-and-current-post/40547/2 "2022-09-15T14:59:47Z")

</div>

Il me semble qu’il faudrait configurer related dans config.toml pour prendre en compte l’année et non serie.

---

<div class="post-metadata">

**Author:** ![Welsh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/welsh/32/16693_2.png) [@Welsh](https://discourse.gohugo.io/u/Welsh)\
**Post date:** [September 15, 2022, 7:59pm UTC](https://discourse.gohugo.io/t/site-regularpages-related-and-current-post/40547/3 "2022-09-15T19:59:11Z")

</div>

Hi

Thanks for the reply.  
In the config.toml you have 🙂

```auto
[related]
  includeNewer = true
  threshold = 80
  toLower = false

  [[related.indices]]
    name = "serie"
    weight = 90

```

so `series` parameter is configured to be the base of related.

It works as I got the list. What I want is the same **but** with the current page in it…

---

<div class="post-metadata">

**Author:** ![Welsh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/welsh/32/16693_2.png) [@Welsh](https://discourse.gohugo.io/u/Welsh)\
**Post date:** [September 15, 2022, 8:07pm UTC](https://discourse.gohugo.io/t/site-regularpages-related-and-current-post/40547/4 "2022-09-15T20:07:11Z")

</div>

Finally I found the explanation [in this postt](https://discourse.gohugo.io/t/how-to-link-the-next-page-with-the-same-tag/32523/7).

You have to append the current page to the collection of related pages.

---

<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 17, 2022, 8:07pm UTC](https://discourse.gohugo.io/t/site-regularpages-related-and-current-post/40547/5 "2022-09-17T20:07:15Z")

</div>

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