/
Example: Extending the results set
Example: Extending the results set
Steps to extend
Navigate to the directory of the currently 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 results component:
<script id="vue-hawksearch-results" type="x-template"> <div class="hawk-results"> <search-results-label /> <banner zone="Top"></banner> <selections /> <template v-if="searchError"> <span>{{ $t('response_error_generic') }}</span> </template> <template v-else-if="searchOutput && searchOutput.Results && searchOutput.Results.length == 0"> <span>{{ $t('No Results') }}</span> </template> <template v-else-if="!waitingForInitialSearch"> <tabs></tabs> <div class="hawk-results__top-tool-row"> <tool-row /> </div> <result-listing /> <div class="hawk-results__bottom-tool-row"> <tool-row /> </div> </template> <banner zone="Bottom"></banner> </div> </script>
Include the file in the project.
Save, build and reload the site.
, multiple selections available,
Related content
Customize search results in Vue.js
Customize search results in Vue.js
More like this
Extending templates
Extending templates
More like this
Kentico: Customize Search results in Vue.js
Kentico: Customize Search results in Vue.js
More like this
Example: Extending the result items with different layout for products and content
Example: Extending the result items with different layout for products and content
More like this
Example: Extending suggestion components
Example: Extending suggestion components
More like this
Example: Place a custom label with search response data
Example: Place a custom label with search response data
More like this