Roots Discourse

Virtual page with Rewirte Api without Custom Post Type Using Data from a Controller

Hello,
I would like to achieve something excactly like here: Virtual page with Rewirte Api without Custom Post Type
Now my issue is that my template is based on many, complex custom queries to various post types. I would like to use a Controller for this but I have no clue how I would hook it into the rewrite filter.
Does anyone from the community have an idea, hint?
Many thanks,
Sabine