Steps to extend
Navigate to the directory of the current active widget template (e.g. Mvc\Views\Hawksearch\Hawksearch.Default.cshtml or the relevant resource package).
Copy the file of the base template or select an existing one.
Edit the file adding or replacing the template override for the pager component:
<script id="vue-hawksearch-pager" type="x-template"> <div class="hawk-pagination__controls"> <button class="hawk-pagination__item" v-on:click="goToPreviousPage"> <left-chevron-svg icon-class="hawk-pagination__left" /> </button> <input type="number" :value="page" v-on:change="onChange" class="hawk-pagination__input" /> <span class="hawk-pagination__total-text"> <span class="break"></span> of {{ totalPages }} <template v-if="totalPages > 1"> pages </template> <template v-else> page </template> </span> <button class="hawk-pagination__item" v-on:click="goToNextPage"> <right-chevron-svg icon-class="hawk-pagination__right" /> </button> </div> </script>
Apply the desired structure in this format. The example above adds the contextualized “page“ or “pages“ string after the total pages parameter. Keep in mind that the value and event bindings are required for the proper functioning of the component. Handle their placement with caution.
Include the file in the project and make it an Embedded resource in the Visual Studio solution.
Save, build and reload the site.