Blog Sections Open
Using Pseudo-Pages for Resource Subviews in Evolution CMS
How to expose subviews such as /reviews under a resource URL without creating a separate child resource for every page.
Sometimes one resource needs more than one public view. A typical example is a product page that should show a short review block on the main URL but expose a full reviews view on a cleaner address such as /page/reviews.
The requirement is usually the same:
- keep the main resource as the source of truth
- reuse its TVs, identifiers, and data
- render a different template for the subview
- avoid creating a physical child resource for every single page
What this pattern is really about
This is a routing problem. You want multiple front-end representations of one resource without duplicating content records.
Two workable approaches
- Custom routing or pseudo-pages: map an extra path segment such as
/reviewsto a controller or snippet that loads the same base resource and renders an alternative template. - Real child resources: create an explicit child page for every extra view and connect it back to the parent. This is simpler, but adds content overhead.
Why pseudo-pages are attractive
- the main resource remains canonical
- you can reuse the same TVs and metadata
- you avoid editor overhead for supporting pages
- URLs stay clean and readable
Practical implementation idea
Detect the trailing path segment, load the base resource, and switch rendering logic when the segment equals reviews.
$resourceId = $modx->documentIdentifier;
$mode = $_GET['view'] ?? null;
if ($mode === 'reviews') {
// render full review template for the same resource
}
In projects with custom front controllers or modern view layers, this becomes even cleaner because the alternative path can map directly to a dedicated controller action.
If you need the same pattern for reviews, specs, downloads, or gallery-only pages, pseudo-pages are often the most maintainable option.
Setting Up a Local Evolution CMS 2.0 Development Environment
How to bootstrap a local Evolution CMS 2.0 development environment with Composer and the CLI installer.
Installing DocLister and Related Extras Safely
A historical but still useful note on installing DocLister and related extras without breaking the manager during setup.