Get by ID & Slug Pages
An entity’s detail/show page can be reached three ways: a unified page that figures out ID-vs-slug for you, and two explicit pages that force one or the other. All three live under /[locale]/[entity]/, and each has a matching edit page.
The routes
Show pages render DetailShowContainer; edit pages render EditEntityContainer. The three ID/slug shapes are identical on both sides:
| Show route | Edit route | Resolves by |
|---|---|---|
/[entity]/[id] | /[entity]/[id]/edit | ID or slug (auto) |
/[entity]/id/[id] | /[entity]/id/[id]/edit | ID (explicit) |
/[entity]/slug/[slug] | /[entity]/slug/[slug]/edit | slug (explicit) |
The pathname handed to getPageConfig mirrors the URL and ends in /show or /edit, e.g. /{locale}/{entity}/id/{id}/show or /{locale}/{entity}/slug/{slug}/edit.
Every page follows the same shape: build the pathname, hand it to getPageConfig with the user’s roles and the page type (SHOW or EDIT), and render the matching container (DetailShowContainer with showProps, EditEntityContainer with editProps). If the lookup comes back not-authorized, not-found, or empty, the page renders the shared NotFoundPage.
const pathname = `/${params.locale}/${params.entity}/${params.id}/show`;
const { data, notFoundEntity, notAuthorized } = await getPageConfig(
pathname,
getUserRoles(),
"SHOW",
);
if (notAuthorized || notFoundEntity || !data) return <NotFoundPage />;
return <DetailShowContainer {...data.showProps} />;The unified /[id] page
The bare /[entity]/[id] page accepts either identifier and picks the lookup from the segment itself: if it’s numeric, the entity is fetched by ID; otherwise it’s treated as a slug. So both of these land on the same page and resolve the same record:
/en/dataanalysis-datacollectors/39 → by ID
/en/dataanalysis-datacollectors/ProductStockLevelCheckSum → by slugThe explicit /id/[id] and /slug/[slug] routes skip the guesswork and always use the stated lookup — handy for links that must be unambiguous, or when a slug happens to look like a number.
Slug lookups only work when the entity implements Sluggable on the backend (it exposes a slug). See Entity Interfaces for the interface flags and the backend implementation.
When the ID / slug doesn’t exist
If neither an ID nor a slug matches, getPageConfig returns notFoundEntity and the route renders NotFoundPage:
/en/dataanalysis-datacollectors/Pro321 → not foundUsage



Related
- Entity Interfaces — the
Sluggableflag - General Details — the detail/show page these routes render
- Sideboxes & Relations — the record-binding panels on that page
Tracking issue: #1161 (Get by Slug Page and Get by ID pages) .