QuestionQ15

Content, CMS, and Storefront

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

The Architect determines that a news entity type will be created. The date and URL-key data will be stored for each record and automatically generated on save. The values can be overridden manually.

The Architect must manage routing for this functionality while following best practice.

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

Choose two
Explanation

URL rewrites are designed to map a customer-facing request path to an internal controller URL, and rewrite records can be generated when the news entity is saved. Alternatively, a custom implementation of RouterInterface can inspect the request path, match the news/{date}/{article_url_key} pattern, locate the corresponding news record, set the internal route and parameters, and forward the request before the standard router handles it. The standard router alone expects a frontName/controller/action URL format, so it does not directly interpret the date and article URL-key segments as the required news record lookup.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!