B
Bonzai 2
Web Parts

Locations

Display office locations with addresses, contact info, images, and directions links.

PeopleFeature Parity: 95%

Get Locations Working in 3 Steps

15-30 minutes

Prerequisites

  • Bonzai 2 package installed on your site
  • SharePoint list with location data
1

Create a locations list

Create a SharePoint list with Title plus optional Address, City, State, PostalCode, Country, Phone, Email, Hours, LocationImage, MapImageUrl, Latitude, and Longitude columns.

2

Add the web part

Edit your page and add "Bonzai Locations" from the Bonzai category.

3

Select your list and configure

Choose your Locations list (optionally a view), configure field visibility, display layout (Cards or List/Table), and publish.

When to Use This Web Part

Use this when you need to...

  • Display office locations
  • Show branch contact information
  • Create an office directory
  • Feature regional offices with maps and directions

Best page locations

  • About Us page — office listings
  • Contact page — office contacts
  • People & Directory page — locations section
  • Global offices page — international locations

Consider alternatives when...

  • Interactive maps — use embedded maps
  • People contacts — use People Listing

Common Configurations

Office Directory

Full office listings with all details

Best for: Contact page
Configuration
titleOur Offices
displayAsCards
itemsPerPage9
showSearchOn
showAddressOn
showPhoneOn
showEmailOn
showDirectionsOn

Regional Offices List

Compact list view of locations

Best for: Sidebar widget
Configuration
titleLocations
displayAsList
showImageOff
showMapImageOff
showHoursOff
itemsPerPage6

Searchable Office Finder

Focus on search with expanded field

Best for: Dedicated locations page
Configuration
titleFind an Office
showSearchOn
expandSearchFieldOn
searchPlaceholderSearch by city or country...
showResultsOnLoadOff

Visual Office Grid

Image-focused card layout

Best for: Homepage
Configuration
titleGlobal Offices
displayAsCards
showImageOn
showMapImageOn
itemsPerPage6
showPagingOff

Best Practices

Add location images

Office photos make the locations more recognizable and visually appealing.

Include map images

Static map images help users quickly orient themselves. Use Google Maps or Bing Maps static image URLs.

Enable directions links

The "Get Directions" button opens Google Maps for easy navigation. Provide Latitude and Longitude when possible — coordinates produce a more reliable destination than a parsed address string.

Troubleshooting

Still need help? Contact Bonzai Support


Reference

Locations List Schema

Create a SharePoint list with these columns:

  1. Create a list to store locations (any name).
  2. Add required Title column entries for each location.
  3. Add optional columns for address, contact, and map details.
ColumnTypeRequiredDescription
TitleSingle line of textYesOffice/location name
AddressMultiple lines of textNoFull street address
CitySingle line of textNoUsed for search and display
StateSingle line of textNoUsed for search and display
PostalCodeSingle line of textNoPostal/ZIP code
CountrySingle line of textNoUsed for search and display
PhoneSingle line of textNoContact phone number
EmailSingle line of textNoContact email address
HoursSingle line of textNoOperating hours
LocationImageImage or HyperlinkNoOffice photo (SharePoint Image column, hyperlink, or plain URL string)
MapImageUrlHyperlink or TextNoStatic map image URL (Google/Bing Maps static image)
LatitudeNumberNoPreferred coordinate for the Get Directions link
LongitudeNumberNoPreferred coordinate for the Get Directions link

Automatic field discovery

Only Title is required. The web part inspects your list at runtime and selects only those optional columns that actually exist, so missing columns are gracefully ignored — no errors when you omit fields.

How Search Works

Search behavior depends on whether a view is selected:

  • No view selected — matches are filtered server-side via OData against Title, and City, State, Countrywhen those columns exist. Note: Address is a multi-line (Note) column and cannot be filtered server-side.
  • View selected — the view is fetched first, then matches are filtered client-side against Title, City, and Address.

Get Directions Link

The "Get Directions" button opens Google Maps:

  • If Latitude and Longitude are present, coordinates are used for the destination.
  • Otherwise the composed full address (Address + City + State + PostalCode + Country) is used.
  • If no address or coordinates are available, the button is hidden.

Property Pane Configuration

Title & Navigation

PropertyTypeDescription
titleTextWeb part title (default: "Locations"). When empty, the header, icon, and description are hidden.
titleUrlTextOptional URL to make the title clickable
titleIconOptionDropdownTitle icon mode: Select Icon or None (default: Select Icon). Choosing None hides the icon slot entirely.
titleIconNameTextFluent UI icon name (default: MapPin). Hidden in the property pane when titleIconOption is None.
titleIconUrlTextCustom icon image URL. When set, overrides titleIconName.
descriptionText (Multiline)Optional description shown below the title
showMoreTextTextText for the footer "show more" link
showMoreUrlTextURL for the footer "show more" link (only shown when both text and URL are set)

Data Source

PropertyTypeDescription
siteUrlTextSite URL where list is located (empty = current site)
listNameList PickerSharePoint list containing locations
viewNameView PickerView to filter locations

Search Options

PropertyTypeDescription
showSearchToggleEnable search functionality (default: On)
searchPlaceholderTextPlaceholder text for search box
showResultsOnLoadToggleShow all results initially (default: On)
expandSearchFieldToggleExpand search field on focus (default: Off)

Field Visibility

PropertyTypeDescription
showAddressToggleShow address (default: On)
showPhoneToggleShow phone number (default: On)
showEmailToggleShow email address (default: On)
showHoursToggleShow operating hours (default: Off)
showImageToggleShow office image (default: On)
showMapImageToggleShow map image (default: On)
showDirectionsToggleShow "Get Directions" link (default: On)

Display Options

PropertyTypeDescription
displayAsDropdownCards or List/Table (default: Cards)
itemsPerPageSlider (3-24)Locations per page (step: 3, default: 9)
showPagingToggleShow pagination controls (default: On)
fixedHeightSlider (0-800)Fixed height in pixels with internal scroll; step: 50, default: 0 = auto
chromeTypeDropdownChrome type: None, Title Only, Border Only, Title and Border (default: Title and Border)

Features Checklist

  • Cards and List/Table display layouts
  • Debounced search with configurable placeholder and optional auto-focus
  • "Show results on load" toggle (search-first experiences)
  • Office images and static map images per location
  • Contact information (phone, email, business hours) with tel: and mailto: links
  • Full address composition from Address, City, State, PostalCode, Country
  • "Get Directions" link using coordinates when available, address fallback
  • Pagination with configurable items per page (3-24, step 3)
  • View-based filtering with automatic fallback to standard queries
  • Automatic field discovery — missing optional columns are ignored
  • Cross-site list support via Site URL
  • Fixed-height scrolling container (0-800px)
  • Title icon (Fluent UI icon or custom image URL) and clickable title
  • Footer "show more" link