-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Magento 2 Development Cookbook
By :
The first thing that we will learn is how to extend the backend with a custom controller action. We need a controller that is secured so that only logged-in backend users can see the contents of this page.
A backend controller is required when you want to add an extra page to the backend of Magento. This is mostly the case when you are working with a custom form or overview that you need for your module.
For development purposes, it is recommended that we remove the secret key (the hash in the URL) from the admin URLs. You can configure this in Stores | Configuration | Advanced | Admin | Security. Change the configuration as shown in the following screenshot:

When you want to add an extra page to your backend, you have to follow these steps:
routes.xml in the folder app/code/Packt/HelloWorld/etc/adminhtml with the following content:<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001...
Change the font size
Change margin width
Change background colour