1

I am overriding a template for the product page, like this: Magento 2 - editing module structure and functions

Then, I want to make a link based on the url (to only show for certain items). Basically, I want information from the route in the phtml file that I am editing.

To do this, should I create a plugin to extend the functionality of the controller that serves up this template to have the information stored? Can I get the information from the controller or block easily from the template code? Is there a good way to find out which controller I would need to extend?

Daniel Thompson
  • 389
  • 3
  • 13

0 Answers0