We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Multiple Modules - Routing: Default routing not working when specifying route opposed to as in single

I have setup my web app to use multiple modules.

I have root index with {{ content() }} to view through to the controllers view.

By default with no route defined when I go to https://myhost.com/invoiceController then the views index and controller view will yield normally.

However when I define a route:

    $router->add(
            "/invoiceController",
            array(
                'module'     => 'frontend',
                "controller" => "invoice",
                "action" => "index"
            ));

Then the root index view is completely bypassed with only the local controllers index view being output.

What gives?



47.7k

This is not what was happening.

The inner volt view was incompletely rendering owing to bad code in the view blocking the rest of the views from rendering.