Lab 6 — Build the plan page template
Purpose: Create an editable template for PHI plan pages with locked structure, useful initial content, and sane policies.
Who this page is for
| Audience | Why it matters to you |
|---|---|
| All engineers | Pairs with Session 6 |
Goal
A "Plan Page" template such that a new plan page starts 80% assembled and authors can only place approved components.
Steps
- Open the Templates console (
/libs/wcm/core/content/sites/templates.html/conf) → your project folder →
Create → pick the base page component from your archetype.
- In Structure mode: add a layout container for the main area; lock header/footer regions.
- Set the main container's policy: allowed components = "PHI Academy" group + Text + Image. Name policies
descriptively ("PHI plan main container") — they are shared, reusable objects.
- In Initial Content mode: pre-add an empty Plan Card and a Text component with disclaimer placeholder text.
- Enable the template, then create
Bronze Hospital Coverfrom it in Sites. Confirm the pre-seeded components exist. - Prove the asymmetry: change structure (add a locked component) → check the existing Bronze page updated;
change initial content → confirm Bronze did NOT change, but a newly created page does.
- In CRXDE, inspect
/conf/<project>/settings/wcm/templates/and find your policy mapping nodes.
Checkpoint
| Verify | Expectation |
|---|---|
| Component offering | Only policy-allowed components appear in the insert dialog |
| Structure propagation | Existing pages reflect structure edits |
| Initial content isolation | Existing pages ignore initial-content edits |
| Template in page node | cq:template property on new page points to your template |