# Custom controllers for custom post types

**URL:** <https://forum.getkirby.com/t/custom-controllers-for-custom-post-types/29855>\
**Category:** Questions\
**Tags:** v3\
**Created:** [October 29, 2023, 3:51pm UTC](https://forum.getkirby.com/t/custom-controllers-for-custom-post-types/29855 "2023-10-29T15:51:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steenweg](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@steenweg](https://forum.getkirby.com/u/steenweg)\
**Post date:** [October 29, 2023, 3:51pm UTC](https://forum.getkirby.com/t/custom-controllers-for-custom-post-types/29855/1 "2023-10-29T15:51:20Z")

</div>

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

> **[Custom post types](https://getkirby.com/docs/cookbook/content-structure/custom-post-types)**
>
> Create different templates for different kinds of content.

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?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [October 29, 2023, 4:08pm UTC](https://forum.getkirby.com/t/custom-controllers-for-custom-post-types/29855/2 "2023-10-29T16:08:02Z")

</div>

> [@steenweg](#):
>
> if it is possible to use separate controllers for each post type

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.

---

<div class="post-metadata">

**Author:** ![steenweg](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@steenweg](https://forum.getkirby.com/u/steenweg)\
**Post date:** [October 29, 2023, 4:11pm UTC](https://forum.getkirby.com/t/custom-controllers-for-custom-post-types/29855/3 "2023-10-29T16:11:15Z")

</div>

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