-
Book Overview & Buying
-
Table Of Contents
Magento 2 Development Cookbook
By :
In your Magento root, create the following folders: We will add an extra page that we can use for several purposes.
We build further on the Packt_HelloWorld module that we created in the previous recipe. Ensure that you have this module in your Magento instance. Also, ensure that the full page cache is disabled when you are developing. You can disable this in the backend by navigating to System | Cache Management.
The following steps show how to add extra pages using controllers and controller actions:
Create the following folders:
app/code/Packt/HelloWorld/etc/frontend
app/code/Packt/HelloWorld/Controller
app/code/Packt/HelloWorld/Controller/Index
In the app/code/Packt/HelloWorld/etc/frontend folder, create a routes.xml file with the following content:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="standard...
Change the font size
Change margin width
Change background colour