<script id="eln-product-paging-template" type="text/x-magento-template">
    <% if (pages.length > 1) { %>
    <div class="pages">
        <ul class="items pages-items" aria-labelledby="paging-label">
            <% if (previous) { %>
            <li class="item pages-item-next">
                <a class="action previous page" href="<%= _.createFilterUrl('page',current-1) %>" title="Previous"
                   id='page_<%= ((current-2)*size) + "_" + size %>'>
                    <span id='page_<%= ((current-2)*size) + "_" + size %>'><?= $block->escapeHtml(__('Previous')) ?></span>
                </a>
            </li>
            <% } %>
            <% _.each(pages,function(page) { %>
            <% if (page == current) { %>
            <li class="item current">
                <strong class="page">
                    <span><%= page %></span>
                </strong>
            </li>
            <% } else { %>
            <li class="item">
                <a href="<%= _.createFilterUrl('page',page) %>" class="page" id='page_<%= ((page-1)*size) + "_" + size %>'>
                    <span id='page_<%= ((page-1)*size) + "_" + size %>'><%= page %></span>
                </a>
            </li>
            <% } %>
            <% }) %>
            <% if (next) { %>
            <li class="item pages-item-next">
                <a class="action  next page" href="<%= _.createFilterUrl('page',current+1) %>" title="Next" id='page_<%= (current*size) + "_" + size %>'>
                    <span id='page_<%= (current*size) + "_" + size %>'><?= $block->escapeHtml(__('Next')) ?></span>
                </a>
            </li>
            <% } %>
        </ul>
    </div>
    <% } %>
</script>