Mecha CMS

Mecha CMS blog and documentation.

Backend Appearance as ‘Normal’ Shield

Updated: Sunday, 07 August 2016

The simplest way to separate your frontend appearance with the backend appearance.

Previously, we’ve talked about how to separate backend page layout with frontend page layout. There is a simpler way to achieve that, just make sure that your normal shield folder still exists in your shields folder. We will use the default shield (the Normal shield) as the backend appearance, so that you can focus on making the frontend shield layout without having to worry about designing the backend layout appearance.

This is not considered as a standard for Mecha in terms of developing a shield, but it doesn’t mean that you are not allowed to do that.

You can do that only by changing the shield configuration value to normal if we are in the manager page:

if($config->page_type === 'manager') {
    $config->shield = 'normal'; // change to `normal`
    Config::set('shield', 'normal'); // change to `normal`

Place the above snippet in your functions.php of your active shield.

Donation and Email Subscription