diff --git a/Resources/Private/Templates/PageBrowser/Index.html b/Resources/Private/Templates/PageBrowser/Index.html index 1b673790b98f48b7e8da1617ba4cce97037d465a..83331c62775fc253a087f7b9654f5b3c7ceeb224 100644 --- a/Resources/Private/Templates/PageBrowser/Index.html +++ b/Resources/Private/Templates/PageBrowser/Index.html @@ -10,11 +10,21 @@ <f:then> <li class="tx-pagebrowse-prev"> <f:variable name="prevPage" value="{currentPage - 1}"/> - <f:link.action addQueryString="1" - additionalParams="{tx_sgjobs_pagebrowser: {currentPage: prevPage}}" - additionalAttributes="{aria-label: 'Previous'}"> - « - </f:link.action> + <f:if condition="{prevPage} == 0"> + <f:then> + <f:link.action addQueryString="1" + additionalAttributes="{aria-label: 'Previous'}"> + « + </f:link.action> + </f:then> + <f:else> + <f:link.action addQueryString="1" + additionalParams="{tx_sgjobs_pagebrowser: {currentPage: prevPage}}" + additionalAttributes="{aria-label: 'Previous'}"> + « + </f:link.action> + </f:else> + </f:if> </li> </f:then> <f:else> @@ -31,10 +41,19 @@ <f:if condition="{enableLessPages} && {showLessPages}"> <li> <f:variable name="lessPage" value="{currentPage - 2}"/> - <f:link.action addQueryString="1" - additionalParams="{tx_sgjobs_pagebrowser: {currentPage: lessPage}}"> - ... - </f:link.action> + <f:if condition="{lessPage} == 0"> + <f:then> + <f:link.action addQueryString="1"> + ... + </f:link.action> + </f:then> + <f:else> + <f:link.action addQueryString="1" + additionalParams="{tx_sgjobs_pagebrowser: {currentPage: lessPage}}"> + ... + </f:link.action> + </f:else> + </f:if> </li> </f:if> @@ -52,10 +71,19 @@ </f:then> <f:else> <li class="tx-pagebrowse-page"> - <f:link.action addQueryString="1" - additionalParams="{tx_sgjobs_pagebrowser: {currentPage: pageLink.page}}"> - {pageLink.number} - </f:link.action> + <f:if condition="{pageLink.page} == 0"> + <f:then> + <f:link.action addQueryString="1"> + {pageLink.number} + </f:link.action> + </f:then> + <f:else> + <f:link.action addQueryString="1" + additionalParams="{tx_sgjobs_pagebrowser: {currentPage: pageLink.page}}"> + {pageLink.number} + </f:link.action> + </f:else> + </f:if> </li> </f:else> </f:if>