Notes

Notes

  • The component fetches search results from an Azure Search API endpoint. The URL is resolved from the datasource item via the DataSourceUrl model property.
  • Facets are preloaded on page load by appending ?facetsonly=1 to the search URL. Facet dropdowns are rendered client-side using Mustache templates.
  • Search results support pagination via a "Load More" button that increments the page parameter.
  • The contextItem attribute is passed as a searchBlockContextItem HTTP header to scope search results to the current content context.
  • Facet dropdowns support both single-select and multi-select modes, controlled by the SingleSelect flag from the API response.
  • Results display a thumbnail image (if available), title with a stretched link, and description text.
  • The component integrates with the favorites system via loadFavorites() after results are rendered.
  • Dictionary items should be used for localizable strings (search placeholder, load more, results count, filter labels) — currently hardcoded with TODO markers.

Control Properties

Resource Search

A resource-specific search interface tailored for Business Hub content. Provides filtered search across resources with category facets, date range filtering, and content type selectors.

Control Properties

This component has no Sitecore rendering parameters template. Configuration is driven by the datasource item and rendering contents resolver.

PropertySourceDescription
DataSourceUrlModel (resolved)The URL of the Azure Search API endpoint. Resolved from the datasource item by the rendering contents resolver ({B1CED76D-CA6C-46BE-AC52-0BDA10E45864}).
ContextItemModel (resolved)The Sitecore item ID used to scope search results. Passed as the searchBlockContextItem HTTP header in API requests.
Column classesBSTools5 parametersStandard column sizing, offset, and padding classes inherited from BSTools5 column rendering parameters.
AddClassBSTools5 parametersAdditional CSS classes appended to the component wrapper.

Template Properties

Template Properties

TemplatePathDescription
JsonBuildingBlock/sitecore/templates/Foundation/AzureSearch/JsonBuildingBlockDatasource template for the rendering. Defines the search configuration used by the rendering contents resolver to produce the DataSourceUrl and ContextItem model properties.

Datasource Location: /sitecore/content/Business Hub/Home/api/search

Rendering Contents Resolver: {B1CED76D-CA6C-46BE-AC52-0BDA10E45864} — resolves the search API URL and context item from the datasource.

Model: ResourceSearch with two bound properties: DataSourceUrl (string) and ContextItem (string), both decorated with [SitecoreComponentField].