Search related results partial
Related category and manufacturer matches.
Output: HTML partial.
| Field | Type | Meaning | Availability |
|---|---|---|---|
viewModel.search |
object | Search data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.search.currenturl |
string | Currenturl value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.search.hasQuery |
boolean | Whether query applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.search.isEnabled |
boolean | Whether enabled applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.search.query |
string | Query value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.search.queryLabel |
string | Prepared query display text. | When the parent is provided; check optional fields. |
viewModel.search.relatedResults |
object | Related results data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.search.relatedResults.groups |
array | Prepared groups collection; may be empty. | When the parent is provided; check optional fields. |
viewModel.search.relatedResults.groups[].entityType |
string | Entity type value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.search.relatedResults.groups[].items |
array | Prepared items collection; may be empty. | For each existing item; optional child fields depend on item type. |
viewModel.search.relatedResults.groups[].items[].customFields |
array | Prepared custom fields collection; may be empty. | For each existing item; optional child fields depend on item type. |
viewModel.search.relatedResults.groups[].items[].description |
string | Description value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.search.relatedResults.groups[].items[].entityId |
number | entity identifier; do not load data with it. | For each existing item; optional child fields depend on item type. |
viewModel.search.relatedResults.groups[].items[].entityType |
string | Entity type value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.search.relatedResults.groups[].items[].image |
object | Image data; check child fields before use. | For each existing item; optional child fields depend on item type. |
viewModel.search.relatedResults.groups[].items[].name |
string | Name value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.search.relatedResults.groups[].items[].typeLabel |
string | Prepared type display text. | For each existing item; optional child fields depend on item type. |
viewModel.search.relatedResults.groups[].items[].url |
string | Prepared url URL; use unchanged. | For each existing item; optional child fields depend on item type. |
viewModel.search.relatedResults.groups[].title |
string | Title value supplied for this context. | For each existing item; optional child fields depend on item type. |
viewModel.search.relatedResults.hasItems |
boolean | Whether items applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.search.relatedResults.title |
string | Title value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.search.resultCountLabel |
string | Prepared result count display text. | When the parent is provided; check optional fields. |
viewModel.search.resultsTitle |
string | Results title value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.search.submitLabel |
string | Prepared submit display text. | When the parent is provided; check optional fields. |
viewModel.search.title |
string | Title value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.search.total |
number | Total numeric value. | When the parent is provided; check optional fields. |
Assets
Section titled “Assets”The reference package uses its bundled theme CSS, Bootstrap and theme JavaScript. Account and checkout controls use the bundled checkout script. Partials use their caller’s resolved assets.
Example
Section titled “Example”Resolve this partial after setting its documented inputs:
<cfinclude template="#request.resolveStorefrontView('partials/search_related_results.cfm', viewModel.theme.key)#">Navigation branches use cfmodule with their documented attributes instead of cfinclude.
Behaviour
Section titled “Behaviour”Use prepared URLs and labels. Encode plain text and HTML attributes; preserve only explicitly prepared HTML.