Name, address, phone
Renders NapBlock and JsonLd from @bison-lab/ui. The phoneE164 field is separate from the displayed number because it, and only it, becomes the tel: href and the structured data’s telephone. A prettified string can never silently become an unreachable link. A department without a name and an E.164 number is dropped rather than published.
The block emits schema.org LocalBusiness by default. The shipped sample turns that off, because a preview must not put a fictional business into a site’s structured data.
import { NapBlock } from "@bison-lab/payload-blocks";
// In the collection's `blocks` array:NapBlockimport { NapBlockRenderer } from "@bison-lab/payload-blocks/react";
// In the site's registry:nap: NapBlockRenderer,Fields
Section titled “Fields”| Field | Type | Notes |
|---|---|---|
businessName * | text | Labelled “Business name”. |
businessType * | text | schema.org type, e.g. "MedicalBusiness", "Chiropractor", "LocalBusiness". Default "LocalBusiness". |
address | group | |
address.streetAddress * | text | |
address.addressLocality * | text | Labelled “City”. |
address.addressRegion * | text | Labelled “State or region”. |
address.postalCode * | text | |
address.addressCountry | text | ISO 3166-1 alpha-2, e.g. US. Default "US". |
departments * | array | A single-location business has one entry, usually named after the business. At least 1 row. Opens with 1 empty row; the admin field will not remove below that. |
departments[].name * | text | |
departments[].departmentType | text | schema.org type for this department. Falls back to the business type. |
departments[].phoneE164 * | text | Labelled “Phone (E.164)”. Dialable form, e.g. "+15551234567". This is what the tel: link and the structured data use. |
departments[].phoneDisplay | text | Labelled “Phone (as displayed)”. Optional. US numbers are formatted automatically when this is empty. |
url | text | Canonical URL for the business. Optional. |
showName | checkbox | Turn off when a heading above the block already names the business. Default true. |
headingLevel | select | Keeps the page's heading order intact. One of h2, h3, h4. Default "h2". |
emitJsonLd | checkbox | Labelled “Emit structured data”. Adds a schema.org LocalBusiness script. Turn off if the page emits its own. Default true. |
* required.