Overriding admin login template

Hi,

I’m looking for a way to override the Pimcore admin login template from a custom bundle. Specifically, I’d like to add a link to a single sign-on page below the login form.

I’ve been looking around for a solution for a while, but it seems there isn’t that much information to be found on this topic. I found some references in the Symfony documentation, but either I can’t get it to work or it doesn’t apply to this specific situation.
Another solution I found seemed to involve making the bundle an extension of the admin bundle, but I’m not sure that’s such a good idea, since only one bundle is allowed to do that and this is such a minor modification.

1 Like

Hey, yesterday I had the same issue and since there are no answers to this anywhere, I started to debug the whole path determination-thing.

The Symfony documentation is partly correct, but the paths differ slightly.

I wanted to override this file:

  • vendor/pimcore/pimcore/bundles/AdminBundle/Resources/views/Admin/Asset/imageEditor.html.php

The proper path for doing this is:

  • app/Resources/PimcoreAdminBundle/views/Admin/Asset/imageEditor.html.php

To make matters worse, I had to delete var/cache/dev/templates.php manually since it somehow was not updated if the old entry was already in there, even when clearing cache.

Thanks for your contribution. Unfortunately that means it will have to be configured for every project. I’m looking for a more generic way to do it (via a bundle), so it can be overridden for each installation. I guess it would make more sense to make an event listener kind of construction for that, since it would be an issue if multiple bundles override the same template. But that would first have to be implemented in Pimcore.