collectionForSlot
Which `COLLECTIONS` entry, if any, a slot definition is bound to.
Which COLLECTIONS entry, if any, a slot definition is bound to.
Keys on the SOURCE alone — no slot-type literal involved: a slot is
collection-bound iff its source is direct and names a COLLECTIONS
field. That a bound slot’s item must be a record (a list carrying
fields) is the authoring gate’s business (@homepages/section-contracts),
not this key.
Import from @homepages/template-kit.
Signature
Section titled “Signature”function collectionForSlot(slot: { type?: string; source?: { kind?: string; field?: string; }; }): CollectionField | nullParameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
slot |
`{ |
type?: string;source?: { kind?: string; field?: string;};}` | required | |
Returns
Section titled “Returns”"units" | "comparables" | "contacts" | null — The collection field name, or null when the slot’s source is not
kind:"direct" or names a field outside COLLECTIONS.
See also
Section titled “See also”acceptsLinkisLinkAcceptsmatchLinkProvidertourEmbedUrlvideoEmbedUrlCOLLECTIONSCONTENT_SLOT_TYPESDECISION_TYPESLINK_KINDSLINK_PROVIDERSLINK_STRATEGIESREF_SLOT_TYPESREFERRAL_FIELDSREFERRAL_IMAGE_FIELDSSLOT_TYPESSOURCE_FIELDSVIDEO_SOURCESLinkProviderCollectionFieldCollectionIdKeyCollectionOwnershipContentSlotTypeDecisionTypeLinkKindLinkProviderIdLinkStrategyReferralFieldReferralImageFieldRefSlotTypeSlotTypeSourceFieldContainerSourceFieldDescriptorSourceFieldNameSourceFieldValueTypeVideoSourceWritebackTarget