ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 22 - AD0-E718 discussion

Report
Export

An Adobe Commerce Architect needs to scope a bespoke news section for a merchant's Adobe Commerce storefront. The merchant's SEO agency requests that the following URL structure: news/{date}/{article_url_key}l where {date} is the publication date of the article, and {article_url_key} is the URL key of the article.

The Architect scopes that a news entity type will be created. The date and URL key data will be stored against each record and autogenerated on save. The values will be able to be manually overridden.

The Architect needs to manage routing this functionality and adhere to best practice.

Which two options should the Architect consider to meet these requirements? (Choose two.)

A.
Create a standard controller route and an Index/Index index controller class that loads the relevant news article by matching the URL date and URL key parts.
Answers
A.
Create a standard controller route and an Index/Index index controller class that loads the relevant news article by matching the URL date and URL key parts.
B.
Create an observer that listens to the controllers_front_send_response_before event, looks for the mm portion of the URL, and If it matches, loads the relevant news article by matching the URL date and URL key parts.
Answers
B.
Create an observer that listens to the controllers_front_send_response_before event, looks for the mm portion of the URL, and If it matches, loads the relevant news article by matching the URL date and URL key parts.
C.
Create a plugin that intercepts lu^jentoXFraBeworkUppXActien::executed, looks for the news portion of the URL and if it matches, loads the relevant news article by matching the URL date and URL key parts.
Answers
C.
Create a plugin that intercepts lu^jentoXFraBeworkUppXActien::executed, looks for the news portion of the URL and if it matches, loads the relevant news article by matching the URL date and URL key parts.
D.
Create a standard controller route and mapping the internal URLs (such as news/article/view/id/1) to rewrites that are generated on save and then stored in the URL rewrites table.
Answers
D.
Create a standard controller route and mapping the internal URLs (such as news/article/view/id/1) to rewrites that are generated on save and then stored in the URL rewrites table.
E.
Create a custom router that runs before the standard router and matches the news portion of the URL. then looks for and loads a news article by matching the date and URL key parts of the URL.
Answers
E.
Create a custom router that runs before the standard router and matches the news portion of the URL. then looks for and loads a news article by matching the date and URL key parts of the URL.
Suggested answer: A, E

Explanation:

Creating a routes.xml file to declare a custom route ID and front name Creating a Router.php file to define the custom router class that extends Magento\Framework\App\Router\Base

Creating an etc/di.xml file to register the custom router class with a specific sortOrder

Creating controller classes and action methods to handle the requests

Based on these steps, I would say that two possible options that the Architect should consider to meet these requirements are:

1. Create a standard controller route and an Index/Index index controller class that loads the relevant news article by matching the URL date and URL key parts.

2. Create a custom router that runs before the standard router and matches the news portion of the URL, then looks for and loads a news article by matching the date and URL key parts of the URL.

asked 02/10/2024
Maritza Van Der Merwe
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first