Now we’ll go to any product view page, and we should see the “HELLO WORLD!” message.
To get a better understanding of how modules work, I would like to view the "HELLO WORLD!" message on a different page. What would I change to view the alert on a different page.
The frontName is a value defined in the module. Using catalog/product/view as an example:
- catalog is the frontName in the module area’s routes.xml file
- product is in the controller folder
- view is the controller class
I thought that I could change the filename catalog_product_view.xml to catalog_product_compare.xml to view the "HELLO WORLD!" alert on the compare page instead, since compare is a class listed as a catalog controller
How would I choose which page I see a "HELLO WORLD!" alert on?
Documentation that helped me understand the answers: