Skip to content
On this page

SearchBook widget

Data attributes

account_token

Type: String

Description: Account token in [account]-[env] format

Required: true

group

Type: String

Description: Account group

Required: false

locale

Type: String

Description: Locale setup

Default: nl

sales_channel

Type: String

Description: Tommy booking sales channel id

booking_url

Type: String

Description: URL used to redirect to booking page

Required: true

location

Type: String

Description: Location API token to filter accommodations

Required: false

alternative_locations

Type: Array

Description: Alternative location API tokens to show extra accommodations if no results are available

Required: false

Default: []

show_sorting

Type: Boolean

Description: Show sorting dropdown

Required: false

default: true

show_view_toggle

Type: Boolean

Description: Show result view type toggle

Required: false

default: true

default_view

Type: String

Description: Default result view type

Required: false

default: grid

Values: grid|list

use_map_view

Type: Boolean

Description: Use map view

default: false

matrix_min_nights

Type: Number

Description: Minimum nights to show in matrix

Required: false

Default: 0

matrix_min_columns

Type: Number

Description: Matrix minimum columns to display

Default: 0

matrix_max_columns

Type: Number

Description: Matrix maximum columns to display

Default: 0

matrix_show_popover

Type: Boolean

Description: Use a popover tooltip on matrix prices with a price calculation overview

Default: true

translations

Type: Array

Description: Array with locale as key with nested array translations (key:value)

Default: []

use_arrangements

Type: Boolean

Description: Show arrangements

default: false

use_special_period_filter

Type: Boolean

Description: Show special period filter

default: false

sorting

Type: String

Description: sorting type in results

Default: default (no sorting)

Allowed Values:

Value
default
price.asc
price.desc

infinite_scroll

Type: Boolean

Description: Use infinite scroll instead of a button to load more results

Default: true

booking_trigger

Type: String

Description: Event name to trigger booking event

Example:

html
data-booking_trigger="bookEventSearchBook"
javascript
document.addEventListener('bookEventSearchBook', function(evt) {
    console.warn('TRIGGER: BookEvent(bookEventSearchBook)', evt.detail);
});

list_item_layout_config

Type: Array

Description: Properties to display in result list item

Default: []

Values:

Value
title
sub_title
description
extra_description
house_type
location
location_country
location_region
location_province
location_city
location_map_image
rating

use_image_slider

Type: Boolean

Description: Use image slider in result item

Default: false

use_image_slider_dots

Type: Boolean

Description: Use image slider dots for pagination

Default: false

use_wishlist

Type: Boolean

Description: Use wishlist to save favorite accommodation

Default: false

use_location_characteristics_switcher

Type: Boolean

Description: Use location and characteristics as checkbox switcher element (only shown when location filter is provided)

Default: false

show_unavailable_items

Type: Boolean Default: false

Description: Show unavailable items in result set

show_alternative_items

Type: Boolean Default: false

Description: Show alternative items in result set

date_start

Type: String

Description: Widget start date

Required: false

date_end

Type: String

Description: Widget end date

Required: false

show_alternative_periods

Type: Boolean

Description: Use alternative periods (tommy only)

Required: false

show_alternative_periods_in_extra_list

Type: Boolean

Description: Show alternative period accommodations in seperate list

default: false

alternative_periods_config

Type: Array<number>

Description: Alternative periods config

Default: [0,1,3,7]

alternative_periods_default_value

Type: number

Description: Alternative periods default value

Default: 0

filters

Type: Array

Description: Filter sequence

Default: []

Values:

ValueDescription
datedatepicker
travelgrouptravelgroup filter
househouse type filter
staystay type filter
locationlocation filter
object_characteristicobject characteristics filter
searchautocomplete
buttonshow button
advanced_filter_buttonshow advanced filter button

advanced_filters_left

Type: Array

Description: Advanced filters left

Default: []

Values:

Array of accommodation characteristic slugs

advanced_filters_right

Type: Array

Description: Advanced filters right

Default: []

Values:

Array of accommodation characteristic slugs

filters_use_buttons

Type: Array

Description: Filters to show as buttons

Default: []

Values:

ValueDescription
househouse type filter
staystay type filter

filter_values

Type: Object

Description: Default filtering values

Default: `{}

Values:

ValueDescription
countryCountry search terms
regionRegion search terms
provinceProvince search terms
locationLocation search terms
houseHouse types
stayStay types
tag_characteristicTag characteristics search terms

filter_allowed_values

Type: Object

Description: Allow specific filtering values (code values)

Default: `{}

Values:

ValueDescription
staystay type codes array
househouse type codes array

search_term_types

Type: Array

Description: Allowed search term types for autocomplete

Default: []

Values:

ValueDescription
countryCountry search terms
regionRegion search terms
provinceProvince search terms
cityCity search terms
locationLocation search terms
accommodationAccommodation search terms
location_characteristicLocation characteristics search terms
accommodation_characteristicAccommodation characteristics search terms
object_characteristicObject characteristics search terms
tag_characteristicTag characteristics search terms

search_term_default_types

Type: Array

Description: Default search term types for autocomplete

Default: []

Values:

ValueDescription
countryCountry search terms
regionRegion search terms
provinceProvince search terms
locationLocation search terms

max_autocomplete_values

Type: Integer

Description: Max autocomplete values (-1 = unlimited)

Default: -1

Values:

show_deposit_cost

Type: Boolean

Description: Show deposit costs in price calculation

Default: false