Lab 3 — Resolution experiments
Who this page is for
| Audience | Why it matters to you |
|---|---|
| All engineers | Pairs with Session 3 |
Exercises
1. JSON views for free (10 min)
Request your Lab 2 page with different extensions and depths:
GET /content/<site>/plans/gold-hospital.json → shallow page node
GET /content/<site>/plans/gold-hospital.1.json → +1 level deep
GET /content/<site>/plans/gold-hospital/jcr:content.infinity.json → full content
Nothing was coded — Sling ships default renderers per extension. (These are typically blocked at the Dispatcher in production; see Dispatcher security.)
2. The resolver console (15 min)
Open /system/console/jcrresolver. Paste your page URL with a selector, e.g. /content/<site>/plans/gold-hospital.summary.html, and read the resolution trace: resolved resource, resourceType, and the exact script chosen. Use this console for the rest of your AEM career.
3. Selector scripts (20 min)
- In CRXDE, find the component your page's
jcr:contentpoints to (itssling:resourceType). - In
/apps/...for that component, copy the main HTL script tosummary.htmland change some visible markup. - Request the page with
.summary.html— your variant renders;.htmlstill renders the original.
4. Super-type walk (10 min)
On the component node, note sling:resourceSuperType. Follow it in CRXDE and find a script your component did not define but still uses (inherited). Map this to extending a base component in React.
Checkpoint
You should now be able to answer, for any URL: *which node, which resourceType, which script, and why.*