I am planning to use a slice-machine for my marketing website which has multiple pages. Let's say I have a Home, About, Contact, Blog page.
At first, I just created a repeatable type called 'page' then create all the pages I need as documents of the page. However, I want to restrict a page to only use a specific set of slices.
Then I decided to create a model for each page with a single type, eg: page-home, page-about, page-contact, page-blog, ... All pages, however, need SEO fields (static fields). I then have to create those SEO fields all over again for each page.
Is there any way to share the SEO static fields?
Also, for the link resolver, I have to do this which is not so nice
If you prefer, you can create a single Custom Type for the home page. And also add a tab for metadata. Thus, you can add static fields (outside the Slices) in each Custom Type
Let's say I have 20 pages, should I add a tab for metadata of each page? That would be a lot of repetition. If I want to add one more field to the SEO, then I have to do it in 20 different places.
The only way to share this kind of information would be to create an additional Custom Type, for example, an SEO single type. And then add this same document to everywhere you need it using a Content Relationship field
There isn't a fixed option that's considered best. It will always depend on your project needs. So it's up to you to choose the option that you find more useful. If you don't wanna repeat information, then the option that I suggested can be a good one. That way you only have one version of a document that you can link to other ones as many times as you need.