Which two options should the Architect consider to meet these requirements?

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.

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.

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.

Answer: A,E

Explanation:

creating a custom router involves several steps, such as:

✑ 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

MagentoFrameworkAppRouterBase

✑ 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:

✑ 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.

✑ 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.

Latest AD0-E718 Dumps Valid Version with 50 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments