Search code examples
spartacus-storefront

How to add additional query parameters in cms page content api call


we want to append the cms page content api used out of box by spartacus for cart page

current: cms/pages?pageType=ContentPage&pageLabelOrId=/cart

required to add some additional query parameter

required: cms/pages?pageType=ContentPage&pageLabelOrId=/cart&staticstorecode=42

what code changes are required to achieve the above scenario?


Solution

  • The page request is made in the load method of the OccCmsPageAdapter. You would need to override this method to add your additional params. You could extend this class and create your own CustomOccCmsPageAdapter and subsequent classes like CustomPage model etc.