<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
	xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
	xmlns:s="http://typo3.org/ns/ApacheSolrForTypo3/Solr/ViewHelpers"
	data-namespace-typo3-fluid="true"
>

<f:section name="Pagination">

	<nav class="solr-pagination">
		<ul class="pagination">
			<f:if condition="{pagination.previousPageNumber}">
				<li class="page-item">
					<a class="page-link solr-ajaxified" href="{s:uri.paginate.resultPage(page: pagination.previousPageNumber)}">&laquo;</a>
				</li>
			</f:if>

			<f:if condition="{pagination.hasLessPages}">
				<li class="page-item"><span class="page-link">....</span></li>
			</f:if>

			<f:for each="{pagination.allPageNumbers}" as="page">
				<f:if condition="{page} == {currentPage}">
					<f:then>
						<li class="page-item active"><span class="page-link">{page}</span></li>
					</f:then>
					<f:else>
						<li class="page-item">
							<f:if condition="{page} > 1">
								<f:then>
									<a class="page-link solr-ajaxified" href="{s:uri.paginate.resultPage(page: page)}">{page}</a>
								</f:then>
								<f:else>
									<a class="page-link solr-ajaxified" href="{s:uri.paginate.resultPage()}">{page}</a>
								</f:else>
							</f:if>
						</li>
					</f:else>
				</f:if>
			</f:for>

			<f:if condition="{pagination.hasMorePages}">
				<li class="page-item"><span class="page-link">....</span></li>
			</f:if>

			<f:if condition="{pagination.nextPageNumber}">
				<li class="page-item">
					<a class="page-link solr-ajaxified" href="{s:uri.paginate.resultPage(page: pagination.nextPageNumber)}">&raquo;</a>
				</li>
			</f:if>
		</ul>
	</nav>

</f:section>

</html>
