{{ $currentTopic := .topic }} {{ $currentModule := .module }} {{ $topics := sort $currentModule.CurrentSection.Pages ".Params.index" }} {{ range $index, $topic := $topics }} {{ if eq $topic $currentTopic }}
{{ if ne (add $index 1) (len $topics) }} {{ $next := index $topics (add $index 1) }} Next Tutorial: {{ $next.Title }} → {{ else }} Return to {{ $currentModule.Title }} → {{ end }}
{{ end }} {{ end }}