Home β€Ί Core Learning Journey β€Ί Session 2 β€” JCR & content modelling basics

Session 2 β€” JCR & content modelling basics

Purpose: Understand the repository as a tree of nodes and properties, and learn the principles for modelling page content well.

Who this page is for

AudienceWhy it matters to you
All engineersContent modelling decisions outlive code decisions

The repository is a tree

The JCR is one big tree β€” think a persistent Redux store with paths instead of selectors. Every node has a type, properties, and children. Every piece of the PHI plan page is a node you can inspect in CRXDE.

/content/phi/plans/gold-hospital          ← cq:Page (the route)
  └── jcr:content                         ← the page's state
        β”œβ”€β”€ root/                         ← layout container
        β”‚     β”œβ”€β”€ hero/                   ← component node (resourceType: .../herobanner)
        β”‚     β”‚     β”œβ”€β”€ title  = "Gold Hospital Cover"
        β”‚     β”‚     └── image  = /content/dam/phi/gold-hero.jpg
        β”‚     β”œβ”€β”€ benefits/               ← benefits table component
        β”‚     └── cta/                    ← call-to-action component
        └── (page props: jcr:title, template, …)

Well-known top-level paths

PathHoldsRule of thumb
/contentPages and site contentAuthors own it
/content/damAssets (images, PDFs)Authors own it
/appsYour code: components, templates' code sideDevelopers own it; immutable in prod
/confEditable templates, policies, CF modelsGoverned collaboration
/etcLegacy shared configAvoid adding new things here
/varRuntime data (workflows, audit)Machines own it

Modelling principles

PrincipleMeaningPHI example
Model content, not layoutStore facts; let components present themStore excessAmount: 500, not "$500 excess" markup
One source of truthShared data lives once, referenced everywhereDisclaimers as a Content Fragment, referenced by all plan pages
Structure for authorsThe tree should match how authors thinkBenefits as child nodes, one per row β€” not a JSON blob property
Respect the hierarchyInheritance and permissions follow pathsAll plans under /content/phi/plans/ inherit that subtree's ACLs

Node types you will meet constantly

TypeMeaning
cq:Page / cq:PageContentA page and its content payload
nt:unstructuredFree-form node β€” most component content
dam:AssetAn asset with renditions under it
sling:Folder / sling:OrderedFolderOrganisational folders

Quick navigation