# Is there any way to do something like .PrevInType?

**URL:** <https://discourse.gohugo.io/t/is-there-any-way-to-do-something-like-previntype/8577>\
**Category:** support\
**Created:** [September 28, 2017, 5:06pm UTC](https://discourse.gohugo.io/t/is-there-any-way-to-do-something-like-previntype/8577 "2017-09-28T17:06:01Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![leandro](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/leandro/32/3399_2.png) [@leandro](https://discourse.gohugo.io/u/leandro)\
**Post date:** [October 16, 2017, 1:32pm UTC](https://discourse.gohugo.io/t/is-there-any-way-to-do-something-like-previntype/8577/6 "2017-10-16T13:32:01Z")

</div>

This works for me:

> [@Previous in Series and Next In Series links](https://discourse.gohugo.io/t/previous-in-series-and-next-in-series-links/2654/7):
>
> Sorry for digging so deep in history, but I solved that problem. I used that to generate blog series links on my blog: [www.itchyfeet.pl](http://www.itchyfeet.pl) (blog is in polish) My piece of code is following: {{ range where .Site.Pages.ByDate "Params.series" .Params.series }} {{ if gt $.Date.Unix .Date.Unix }} {{ $.Scratch.Set "previous" .Permalink }} {{ end }} {{ end }} {{ range where .Site.Pages.ByDate.Reverse "Params.series" .Params.series }} {{ if lt $.Date.Unix .Date.Unix }} {{ $.Scrat…

Thanks!

---

_[View the full topic](https://discourse.gohugo.io/t/is-there-any-way-to-do-something-like-previntype/8577)._
