Skip to main content
Docs
›
offer.where

offer.where

Offer

Offers the catalogue entries that match your conditions.

Signature

offer.where(where: ContentWhere, opts?: { maxItems?: number; flag?: { by: string; map: Record<string, string> } }): ContentOffer

Parameters

NameTypeRequiredDescription
whereContentWhereRequiredThe field conditions an entry must meet.
opts{ maxItems?: number; flag?: { by: string; map: Record<string, string> } }OptionalExtra settings, such as maxItems for the most entries to offer.

Returns

ContentOffer The offer, to pass to list.add or list.addRow.

Example

list.add(self, "pack", trinket, offer.where({ weight: { lte: 3 } }));