HomeCore Learning Journey › Lab 3 — Resolution experiments

Lab 3 — Resolution experiments

Purpose: Prove the resolution rules to yourself by requesting the plan page with different selectors, extensions and tools.

Who this page is for

AudienceWhy it matters to you
All engineersPairs 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)

  1. In CRXDE, find the component your page's jcr:content points to (its sling:resourceType).
  2. In /apps/... for that component, copy the main HTL script to summary.html and change some visible markup.
  3. Request the page with .summary.html — your variant renders; .html still 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.*

Quick navigation