Home β€Ί Core Learning Journey β€Ί Session 6 β€” Templates, policies & pages

Session 6 β€” Templates, policies & pages

Purpose: Understand editable templates: how page structure, initial content and component policies govern what authors can build.

Who this page is for

AudienceWhy it matters to you
All engineersTemplates are where component work meets site governance

What an editable template is

A React layout component decides structure in code. An editable template does it as governed content in /conf: structure (fixed regions), initial content (starting state of new pages), and policies (what authors may do where).

/conf/phi-academy/settings/wcm/
  β”œβ”€β”€ templates/plan-page/
  β”‚     β”œβ”€β”€ structure/    ← locked page skeleton (header, main container, footer)
  β”‚     β”œβ”€β”€ initial/      ← pre-seeded content for NEW pages (empty plan-card, disclaimers)
  β”‚     └── policies/     ← which policies apply where
  └── policies/           ← the policy definitions themselves
Template partReact analogyEditable by
StructureThe layout JSX around {children}Template authors only
Initial contentDefault props/state for new pagesCopied into each new page, then diverges
PoliciesPropTypes + allowed-children constraintsTemplate authors

Policies in practice

A policy on the main container answers: which component groups are offered here? A policy on a component answers: which of its options are enabled? (e.g. allowed styles from the Style System, permitted embed types).

For the PHI plan page template:

RegionPolicy decision
Header/footerLocked in structure β€” authors cannot touch
Main containerAllows "PHI Academy" group (plan-card, benefits table, CTA) + text/image
Plan-cardStyle policy offers "featured" and "compact" variants

Pages from templates

Every page stores a pointer to its template (cq:template). Structure changes propagate to existing pages; initial content affects only new pages. That asymmetry is the number-one template surprise β€” remember it.

Design notes

Quick navigation