Titles for multipage posts

I have dedicated some time to adapt this solution to my current site setup. Everything is in place except for one issue. I would like to add a condition where if one of the paginated posts has a title, then that title is shown, else fall back to the {{ $title }} (continued) option. Any tips on how to achieve this?

{{- if eq $paginator.PageNumber 1 }}
<h1>{{ $title }}</h1>
{{- else if gt $paginator.PageNumber 1 }}
    {{- if (isset .Params "title") }}
    <h2>{{ .Title }}</h2>
    {{ else }}
    <h1>{{ $title }} (continued)</h1>
    {{- end }}
    {{- end }}
{{- end }}

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