Link
The plain item beside a mega menu: a label and a destination, picked from published pages or pasted as a URL. There is no renderer to register; headerItemsFromBlocks resolves the destination through the site’s resolveLink, maps the row to a FloatingNavBlock item, and the bar renders its own link. A row whose page is missing or unpublished is dropped from the bar.
newTab is stored but not carried into the bar, because FloatingNavItem has no such field.
import { LinkBlock } from "@bison-lab/payload-blocks";
// In the collection's `blocks` array:LinkBlockFields
Section titled “Fields”| Field | Type | Notes |
|---|---|---|
type | radio | Labelled “Goes to”. One of page, external. Default "page". |
page * | relationship | Relationship to pages. |
href * | text | Labelled “URL”. A full URL ("https://example.com"), "mailto:" or "tel:", or a site path ("/contact"). |
label * | text | Labelled “Label”. |
newTab | checkbox | Labelled “Open in a new tab”. Default false. |
* required.