Range Template Question

Hey everyone, I’d like my list page to do different things based on what’s happening. Right now, I have it listing all of my tagged articles, providing the title, description, and other associated tags – that part is great.

However, I’m hoping to leverage the same list page as a release changelog. Is it possible to add a statement that says if .Kind "term" && values contain "releases", print the releases in reverse order instead? (most recent first, oldest last). I’m new to templating and not quite sure what that would look like if possible. I know I need to use .Reverse here after the if statement {{ range .Data.Pages.Reverse }}. It can be reverse weight or date (I think date would be easier).

Note: “releases” is only one of the tags added to each release.

{{ if eq .Kind "term" }}
<ul style="list-style-type:none;">
{{ range .Data.Pages }}

	<a href="{{.RelPermalink}}"><h2>{{.Title}}</h2></a> <p>{{ .Description}}</p> {{ partial "tags.html" . }}</li>
	{{ end }}

could this help?

I wound up creating a layout specific to releases that had its own list.html and with the range in the reverse order. it works but when you click a tag the order returns to the normal order because it’s using the normal list.html page. looking into a way to fix that.