-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Multiple global content types #2668
feat: Multiple global content types #2668
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
It'd be good to update our doc
Co-authored-by: LarΓcia Mota <[email protected]>
yeah, the docs @mariana-caetano already started to create. |
## What's the purpose of this pull request? - #2668 introduces a bug in its last commit. This PR removes the checking for the MissingContentError in getPage ## How it works? <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> ## How to test it? <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> ### Starters Deploy Preview <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> ## References <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> ## Checklist <em>You may erase this after checking them all π</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request)
β ποΈ 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
andglobalFooterSections
.How it works?
Added
globalHeaderSections
andglobalFooterSections
globalHeaderSections
- injected before the Children section fromglobalSections
content type.globalHeaderFooter
- injected after the Children section fromglobalSections
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:
vtex switch <account>
globalHeaderSections
andglobalFooterSections
content types, sync the hCMS with the command:yarn cms-sync
. you can use the dry optionyarn cms-sync -d
(just for tests before really sync).globalHeaderSections
andglobalFooterSections
.globalHeaderSections
before the Children andglobalFooterSections
after the children.hCMS

Starters Deploy Preview
you can check the section in this preview
https://storeframework-cm652ufll028lmgv665a6xv0g-isf4taa08.b.vtex.app/
References
https://vtex.slack.com/archives/C02JMH9AYR1/p1738007781146059