How to make an existing banner nestable
This document will guide you through the process on how to make an existing banner nestable. A nestable banner can be added inside the GridWrapper banner.
Type Package
- Update the merge type
- Begin by updating the merging banner type called
AnyNestableBanner, which can be found inside theshophub/componentsfolder.
💡
After making these changes, rebuild your types to ensure they are available throughout the project.To rebuild types execute this command in your project root:
yarn types:initBackend Package
- Update the getNestableBanner function
- Update the function that fetches the nestable banners for a grid wrapper within it's switch statement. The file can be found in
cms/referenced-banner/referenced-banner.service.ts.
Frontend Package
- Update the Banner Switch Statement
- Update the switch statment found inside the
gridRowBannerVariantstatement by adding the desired new banner component. The file can be found inshophub/grid-wrapper/GridRow.tsx.