Skip to content
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

Concern over the "home" living as a global #1

Open
DanRibbens opened this issue Jan 30, 2025 · 1 comment
Open

Concern over the "home" living as a global #1

DanRibbens opened this issue Jan 30, 2025 · 1 comment

Comments

@DanRibbens
Copy link

Hi @brijr!

Very cool to see you making a starter SaaS on Payload!

I noticed that you have the home page stored as a global and wanted to caution against that.
https://github.com/brijr/payload-saas-starter/blob/main/src/globals/Home.ts

It can work and the simplicity is nice so I understand why you'd consider this approach. The problem you will run into is when you want to add links that exist as relationship fields in your other collections or from richText. You will have to hardcode links to home instead.

Best of luck to you and this repo!

@brijr
Copy link
Owner

brijr commented Jan 30, 2025

Ahh I see, thank you @DanRibbens, I will switch to the page collection approach and specify the homepage? Is that what you would recommend?

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants