Custom controllers for custom post types

I use custom post types in a project as described in this recipe.

I am wondering if it is possible to use separate controllers for each post type and if the same syntax would apply to their naming, e.g. for a post type

templates/article.video.php

the corresponding controller would be named

controllers/article.video.php

If not, any other recommendation how to implement different controllers for different post types?

Yes, of course, you can create a controller for each page type (and also page models, if needed).

Basically, content file text name, template, blueprint, controller and page model are all connected through their file names.

1 Like

Great! Thank you very much for your quick reply, Sonja!