-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Multiple global content types (#2668)
๐๏ธ delete both content types in storeframework account after PR got merged. ๐๏ธ sync FS + hCMS in vtex account. ## What's the purpose of this pull request? This pull request handles multiple global content types. Now the global sections are expected to have: `globalHeaderSections` and `globalFooterSections`. ## How it works? Added `globalHeaderSections` and `globalFooterSections` `globalHeaderSections` - injected before the Children section from `globalSections` content type. `globalHeaderFooter` - injected after the Children section from `globalSections` content type. All the pages now are fetching these content types if they exist and merging all global sections. ## How to test it? with the version of this PR in the starter: 1. login in your account `vtex switch <account>` 2. if the account didn't have the `globalHeaderSections` and `globalFooterSections` content types, sync the hCMS with the command: `yarn cms-sync`. you can use the dry option `yarn cms-sync -d` (just for tests before really sync). 3. in the hCMS, add the 2 new documents with sections using the new content types `globalHeaderSections` and `globalFooterSections`. 4. make sure the sections are shown in the expected places: `globalHeaderSections` before the Children and `globalFooterSections` after the children. hCMS <img width="400" alt="Screenshot 2025-02-04 at 12 42 17" src="https://github.com/user-attachments/assets/b30dc7cb-f507-4109-8065-7bb5c5d6aac3" /> | globalHeaderSections | globalFooterSections | |--------|--------| | <img width="1234" alt="Screenshot 2025-02-04 at 12 18 01" src="https://github.com/user-attachments/assets/fc9bfae8-0f7d-4a1b-aae8-5293a4007518" /> | <img width="1241" alt="Screenshot 2025-02-04 at 12 18 14" src="https://github.com/user-attachments/assets/1c1f5a5b-9689-4667-ae12-2c8732521b59" /> | ### Starters Deploy Preview - vtex-sites/starter.store#680 you can check the section in this preview https://storeframework-cm652ufll028lmgv665a6xv0g-isf4taa08.b.vtex.app/ ## References https://vtex.slack.com/archives/C02JMH9AYR1/p1738007781146059 --------- Co-authored-by: Larรญcia Mota <laricia.mota@vtex.com.br>
- Loading branch information
1 parent
1ef5f7a
commit 8555310
Showing
17 changed files
with
473 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.