How to properly use routing with full-featured page rendering (theme, header/footer, assets)?

Hi everyone,

The Concrete CMS routing system is great for building endpoints and small views using Concrete\Core\View\View. I’ve used it successfully for rendering simple templates – that part works.

But here’s the issue:

:red_circle: View doesn’t behave like a full Concrete CMS page. It skips theme headers/footers, doesn’t load assets (like toolbar CSS/JS), and isn’t part of the page hierarchy.

I want to build real pages – like /account/activate – using routing, without polluting the sitemap or relying on single pages. But these pages should look and behave like any normal CMS page.

My questions:

  • Is PageView or some other class the right way to render full pages via routing?
  • Is there an officially supported way to render routes using full themes, assets, page context, etc.?
  • Can I set a “current page” context so things like permissions, navigation components, or theme settings work as expected?

Right now, routing gives me control and clean URLs, but I lose everything that makes Concrete feel like Concrete. I’m looking for a best-practice approach to bridge that gap.

Any advice, examples, or even internal hacks would be appreciated.

Thanks!

– Darek

For the context you can do


$request->setCurrentPage($page);

To be safe I usually record the current page first, then reset it after.

I often use it with AJAX requests and it is also useful when generating search content for any block that has output dependant on the current page.