Template from Plugin not usable in Admin

I’m currently stumbling over an IMHO strange behaviour when trying to use a template from my plugin in the admin backend.
I followed the official docs and then created calendar.html.twig in my plugin’s template directory.
now when I create a new page, I thought it would be possible to select this template as Page Template, but it does not work.
I can, however, create a file calendar.md in a new page folder, an then, in the admin, it looks like this:

  • note that the type calendar is correctly displayed, and I can also see that the template is actually used when I look at the page, but: I can’t select the correct template in the dropdown - my custom type is just not displayed there, so, saving the page in the admin is not possible, because it will be of a wrong type.
    did I miss something here ?

ok, the solution seems to be simple, I had to use the Override Option for Display templates:


so, as a conclusion, page save in admin does work and preserve the correct page type,
but that ist not selectable in the dropdown, where only the templates from the theme will be shown.

1 Like

just to complete this issue, after some more investigation, I found a much more elegant solution here, which actually allows direct selection of plugin-provided templates in the admin.
this is now also implemented in the latest version of my fullcalendar plugin.