stafftastic Docs
Spaces

Advanced Usage

Configuration

Spaces can be configured using attributes on the <script> element. The following attributes are supported:

AttributeDefaultType
data-targetstring The ID of the element where the Space will be embedded
data-space-idstring
data-localedestring Either en or de
data-param-namespacestring Scope the query parameters for the Space
data-param-namespace is optional. You usually only need it if you want to avoid conflicts with other URL parameters. The namespace is prepended to all URL parameters used by the Space, separated by a colon. For example, if you set data-param-namespace="stafftastic", the occupation filter will be stored in the URL as stafftastic:filter[occupation_group_ids] instead of just filter[occupation_group_ids].
data-locale will not change the language of the Space if the user has a different language preference set in their browser. It will only be used as a fallback if no preference is set or a preference is set that is not supported by the Space.

Query parameters

Query ParameterDefaultType
page[number]1number
filter[distance]25000number Search radius in meters
filter[latitude]Defined on the spacenumber Latitude of the search origin
filter[longitude]Defined on the spacenumber Longitude of the search origin
filter[location]Defined on the spacestring Human-readable label for the search location
filter[from]string Start of the date range filter, ISO 8601 date (e.g. 2024-01-01)
filter[to]string End of the date range filter, ISO 8601 date (e.g. 2024-12-31)
filter[occupation_group_ids][]string[] Repeatable. Filter by occupation group IDs
filter[range][distance]Deprecated — use filter[distance]number
filter[range][position][latitude]Deprecated — use filter[latitude]number
filter[range][position][longitude]Deprecated — use filter[longitude]number
filter[date][from]Deprecated — use filter[from]string
filter[date][to]Deprecated — use filter[to]string
These query parameters will be prefixed with the data-param-namespace if it is set. For example, if data-param-namespace="stafftastic", the occupation group filter will be stored in the URL as stafftastic:filter[occupation_group_ids] instead of just filter[occupation_group_ids].