{{ $title := .title }} {{ $p := .pages }} {{ if and (.limit) (not .paginate) }} {{ $p = first .limit .pages }} {{ end }} {{ $paginator := .pages }} {{ if .paginate }} {{ $paginator = .context.Paginate $p }} {{ $p = $paginator.Pages }} {{ end }} {{ if $p }}