Skip to main content

Task recipe · ARC 2.0.0-beta.28

Recipe: bind source to layout

Declare a content source, then bind it into a layout component — sequence of guide and unit pages only.

Task: declare a named content source under a page, then pass it into a layout section as a complete $source.<name> value. Field-level contracts live on reference and unit pages.

Outcome

  • pages/<page>/sources/<name> (+ optional .sort / .limit / .filter)
  • A layout.aup section whose top-level prop is the full $source.<name> binding
  • Undeclared bindings and empty results are diagnosable
  1. Know what a content object is: Content objects, metadata, and locales.
  2. Authoring guide for path / sort / limit / filter and empty states: Bind content to a page.
  3. Field and diagnostic reference: Source-binding reference.
  4. Where the section sits in a page: Compose pages and layouts · AUP layout boundary.

Canonical units that commonly receive $source

Consumer roleUnit page
Card listcontent-card
Related readingrelated-content
Event cardsevent-card
Tag chipstag-list
Site editorial feed (site package)site editorial-feed
Site period index (site package)site period-index

Open the unit page for props such as items, emptyText, and variants. This recipe does not copy those tables.

Binding rules (pointers only)

RuleWhere it is specified
Complete $source.<name> as a section top-level prop valueBind content to a page
Source path stays under /content/<type>/Source-binding reference
Undeclared name → source-binding-undeclared (when checks run)same reference + Diagnose a site
Component empty state for legitimate zero resultsthe layout component unit you chose

AUP data lists (different path)

Interactive AUP apps often list AFS data with the afs-list primitive, not with Web Device $source files:

Do not conflate $source (Web Device content query) with afs-list (AUP tree / session data).