Templates
SearchResultTemplate
Section titled “SearchResultTemplate”This template function is used to determine how search results are rendered within a <searchcraft-search-results>
component.
type SearchResultTemplate<T> = ( data: T, index: number, utils: { html: TemplateHtml },) => string;
ResultsInfoTemplate
Section titled “ResultsInfoTemplate”This template function is used to determine how the <searchcraft-search-results-info>
component renders the values that it receives.
type ResultsInfoTemplate = ( data: { range: [number, number]; count: number; responseTime: string; }, utils: { html: TemplateHtml },) => string;
CustomAdTemplate
Section titled “CustomAdTemplate”This template function is used to determine how custom ads are rendered within the search results container.
type CustomAdTemplate = ( data: { adContainerId: string; searchTerm: string; }, utils: { html: TemplateHtml },) => string;