ExamGecko
Question list
Search
Search

Question 19 - AD0-E711 discussion

Report
Export

Which file is used to add a custom router class to the list of routers?

A.
config.xml
Answers
A.
config.xml
B.
routes.xml
Answers
B.
routes.xml
C.
dl.xml
Answers
C.
dl.xml
Suggested answer: B

Explanation:

In Magento's routing process configured area routers takes precedence over global router configurations defined in config.xml . So , One can add a custom router class definition inside routes.xml like this : ``` ="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd"> <router id="[ROUTER_ID]"> <route frontName="[FRONT_NAME]"> <module name="[MODULE_NAME]" before="[OTHER_ROUTE_OR_MODULE]"/> </route> </router> </config> ``` Reference :

https://devdocs.magento.com/guides/v2.4/extension-dev-guide/routing.html#cusroute_def

asked 02/10/2024
Mikael Klingebrant
30 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first