Listing Detail (PDP) — How it works
Technical anatomy of the property detail page. Overview: Listing Detail.
Routes & entry
| Route | Entry |
|---|---|
/listing/[[...listingName]] | @templates/ListingPageTemplate → @pages/listing/ListingPageContent |
The route fetches the listing (and LiveBy demographics) server-side and passes them into the template.
The demographics come from APILocations.fetchLiveByDemographics: of the LiveBy neighborhoods
nearest the listing, the smallest one whose polygon contains it (the nearest one when none does).
A neighborhood without population (a park) yields no demographics, so the section is hidden.
Providers
Mounted by ListingPageTemplate, outermost → innermost:
SearchProvider local instance — powers "similar listings", NOT global search
└─ ListingProvider the listing + guest restriction/blur state → useListing
└─ ListingDetailsProvider detail sections resolved by property class → useListingDetails
└─ LiveByDemographicsProvider demographics for the location → useLiveByDemographics
└─ ListingPageContentThe route also conditionally wraps the template in two enrichment providers, each gated by an
env var: ListingEnrichmentProvider (when MOVESMARTLY_API_URL is set) and
PlansAndSurveysProvider (when PYB_API_URL is set) — a neighborhood-enrichment source and a
boundary-data source.
Component tree
ListingPageContent
├─ ListingHeader address, price, status, share
├─ Container
│ ├─ ListingMainContent gallery + the detail sections
│ ├─ ListingSidebarContainer if listings.components.sidebar && not an agent
│ │ └─ ListingContactForm
│ └─ GalleryDialog · SlideshowDialog · FullscreenRibbonDialog · FullscreenGalleryDialog
│ each gated by listings.components.*
└─ ListingFooterListingMainContent is a tenant fork root — tenant-specific sub-components live in its
_<tenant>/components/; the default sections stay common.
Configuration
| Config | Drives |
|---|---|
@configs/listings | components (which PDP blocks render), navigationItems (section order), pricing, gallery, scrubbed, statusLabels, linksInNewTab (open listings linked from a listing in a new tab), addressFormat (us vs default street ordering), titleFormat (default verbose vs compact SEO <title>), extendedHistory (read the history block from the property-level history endpoint instead of the listing detail). |
@configs/filters | soldDateSource (soldDate vs timestamps.closedDate — the field every sold date, sold sort and sold statistics window reads). |
@configs/map | provider — google forces a static map on the PDP. |
@configs/forms | Required fields of the enquiry (requestInfo) and tour (tour) forms, incl. requiredAny groups such as “email or phone”. See Shared Components → Forms. |
@configs/badgeSurfaces | Which statuses badge a card per surface (map, search, carousel, locations, favorites, recent) and on the PDP gallery (none by default). |
@configs/features | blurRestrictedProperty gate. |
Gotchas & hints
- PDP block visibility is config, not feature flags.
listings.components.*(header/sidebar/gridGallery/slideshow/fullscreenGallery/…) own the formerpdp*flags — a hidden block still leaves the page intact, so it’s config. See the features-vs-config rule. SearchProviderhere is a second, local instance — it drives similar-listings without touching the global search state (the same provider is also mounted on the search page).- Links to other listings from a listing open in a new tab when
listings.linksInNewTabis on (the default): the Listing History MLS links and the similar-listings carousel here, plus the estimate result comparables — so browsing a listing never navigates you away. Modifier-clicks (Ctrl/Cmd/middle) always open a new tab regardless. - SEO
<title>has two shapes, picked bylistings.titleFormat.defaultis verbose (type · status · location · beds · baths · sqft · address);compactis address-first —"3816 B Evanston Avenue N, Seattle, WA 98103"(URBN). Both end with the MLS number (… | MLS# 2546317) and are built ingetSeoTitle(utils/listings/seo.ts); the title is English-only (not run through i18n). extendedHistorychanges where the history block comes from. With the flag off, the block renderslisting.historyembedded in the detail record, which only covers the board that record was read from — a tenant reading several boards (movesmartly: 90, 91 and 2) sees part of a property’s history. With it on,APIListingDetails.fetchListingpairs the detail request withGET /api/listings/history?mlsNumber=…and the answer replaceslisting.history; an error or an empty answer keeps the embedded array. Both the server-rendered PDP and the listing browser inherit this from that one method — no component reads the endpoint directly.- Sidebar is hidden for agents (
!agentRole) even whencomponents.sidebaris on. - Restricted listings are blurred/limited for guests when
blurRestrictedPropertyis on — see Regional & MLS Limits. - Enrichment providers are env-gated (in the route, around the template):
ListingEnrichmentProvidermounts whenMOVESMARTLY_API_URLis set,PlansAndSurveysProviderwhenPYB_API_URLis set — two independent gates (typically enabled for the enrichment tenant).
Workflow and verification
Source review: e30dd9b47, 2026-11-02. The cross-layer guide covers MLS/board resolution, optional history and page fallback. Selected detail/SEO tests and a direct sample-data page were checked; restricted-board access was not replayed.