Skip to content

Name, address, phone

Name, address, phone · sample rowOpen ↗

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.

payload.config.ts / collections
import { NapBlock } from "@bison-lab/payload-blocks";
// In the collection's `blocks` array:
NapBlock
blocks/registry.ts
import { NapBlockRenderer } from "@bison-lab/payload-blocks/react";
// In the site's registry:
nap: NapBlockRenderer,
FieldTypeNotes
businessName *textLabelled “Business name”.
businessType *textschema.org type, e.g. "MedicalBusiness", "Chiropractor", "LocalBusiness". Default "LocalBusiness".
addressgroup
address.streetAddress *text
address.addressLocality *textLabelled “City”.
address.addressRegion *textLabelled “State or region”.
address.postalCode *text
address.addressCountrytextISO 3166-1 alpha-2, e.g. US. Default "US".
departments *arrayA 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[].departmentTypetextschema.org type for this department. Falls back to the business type.
departments[].phoneE164 *textLabelled “Phone (E.164)”. Dialable form, e.g. "+15551234567". This is what the tel: link and the structured data use.
departments[].phoneDisplaytextLabelled “Phone (as displayed)”. Optional. US numbers are formatted automatically when this is empty.
urltextCanonical URL for the business. Optional.
showNamecheckboxTurn off when a heading above the block already names the business. Default true.
headingLevelselectKeeps the page's heading order intact. One of h2, h3, h4. Default "h2".
emitJsonLdcheckboxLabelled “Emit structured data”. Adds a schema.org LocalBusiness script. Turn off if the page emits its own. Default true.

* required.