SAP / spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
Apache License 2.0
744 stars 389 forks source link

Configurable router links in footer #721

Closed Platonn closed 5 years ago

Platonn commented 5 years ago

Links from CMS in footer are not configurable, but they should be. And they should support external links.

In simple words there should be in footer-navigation.component.html in line 17:

<cx-generic-link [url]="{ url: link.url } | cxTranslateUrl" ...>

instead of

<a [href]="link.url" ...>

For reference, you can see how it's done in BannerComponent. It should be very similar here.

Platonn commented 5 years ago

QA steps

  1. configure inside StorefrontModule.withConfig() in app.module the optoin: routesConfig.translations.en.help.paths to be the array ['test'].
  2. run the app
  3. verify that in the footer navigation there is a link to FAQ page (which is help in other words) and the link directs to /test
  4. click this link and verify you are in FAQ page which has /test url in browser navigation bar
  5. verify that in the footer navigation there is also link to 'About SAP Commerce Cloud' (external link) and you click it and be navigated to external page