Jonas Siewertsen

For those who like it their way

How to customize the Statamic login and control panel

Is it possible to customize the Statamic login page? What about the control panel? Maybe you want to customize everything? Let me show you, how to do so.


MAY 6TH, 2020

Don't get me wrong: I am a big fan of the Design by Jack for Satamic, but there might be cases where you want to customize some views. Maybe using some different colors to fit better to an existing CI/CD?

Customizing Statamic view

Go inside your views directory

/rersources/views/

Add two more folder, so you will get the following structure

/resources/views/vendor/statamic/

Copy and paste the views you want to customize from the Statamic resources folder and customize them as you like.

You will find them here, starting from your application root folder

/vendor/statamic/cms/resources/views/

That's it!

Important

In case you can't find a vendor directory inside your application root directory, you may have forgotten to run composer install?

It's important to keep the exact file names and structure from the statamic repository.

Customizing the login page

Make a copy of the login.blade.php inside the auth folder from the Statamic repository. To keep the exact structure, you need to create:

/resources/views/vendor/statamic/auth/login.blade.php

Customize the view and you should see your changes instantly.

Customizing the Control Panel

It's the same as with the login screen. If you like to customize the Control Panel header, find the global-header.blade.php inside the partials directory and copy the file over.

Why does it work like that?

If we think it about: Technically the Statamic CMS is a Laravel Package and all packages do follow a Laravel convention:

"When you use the loadViewsFrom method, Laravel actually registers two locations for your views: the application's resources/views/vendor directory and the directory you specify. (https://laravel.com/docs/7.x/packages#views)"

Have fun customizing!