Only display pagination link if necessary

Otherwise, search engines start indexing pages that aren't filled yet.

Refs #189.
This commit is contained in:
Franz Liedke 2018-01-10 20:34:25 +01:00
parent c07ed29057
commit a331f750cf

View File

@ -16,5 +16,7 @@ $url = app('Flarum\Http\UrlGenerator');
@endforeach
</ul>
<a href="{{ $url->to('forum')->route('index') }}?page={{ $page + 1 }}">{{ $translator->trans('core.views.index.next_page_button') }} &raquo;</a>
@if (isset($document->links->next))
<a href="{{ $url->to('forum')->route('index') }}?page={{ $page + 1 }}">{{ $translator->trans('core.views.index.next_page_button') }} &raquo;</a>
@endif
</div>