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
738 stars 383 forks source link

Extendability of Page Layout Component #3637

Open Platonn opened 5 years ago

Platonn commented 5 years ago

The PageLayoutComponent is the 'father' of all CMS components - he indirectly initializes them using cmsComponents config. But 'he' cannot be customized himself using cmsComponents config or any other way.

The PageLayoutComponent is hardcoded into all Spartacus' routes. So it's not easy to replace it with a custom version. You need to disable Spartacus' routes by config (and also dismante StorefrontModule to opt from Spartacus' suffix routes - note we plan to disable them by config too, soon https://github.com/SAP/cloud-commerce-spartacus-storefront/issues/3523). Then you can define your custom routes with your custom (extended) page layout component.

We may think of improving extendability of the PageLayoutComponent by delegating logic to the component service (which ideally should be stateless).

johntday commented 9 months ago

what is the status of this?