Hi there everyone,
i want to migrate our company website (implemented with php and kirby cms) to contentful and build / deploy it with Gatsby and learn about React on the way, but i am already struggling coming up with decent content models.
This is my first attempt at creating a website using the JAM stack and therefore i would appreciate some guidance.
I am looking for good and flexible way to create a model for our websites’
Pages (Homepage, Company Page and Sub Pages like Contact / Imprint etc.) and allow editors to choose from different
Modules depending on the
Layout associated with the
Currently the structure of our website is as follows:
- Has a Carousel
- Has a Links to pages (Products / Solutions …)
- News (latest X articles)
- Some other blocks…
- Displayed in Categories
- Displayed in Categories
- Subpage is a Service
- News / Blog
- Blog Posts ( Similar to Contentful Example )
- Different Sub Pages, E.g. jobs, contact, imprint, data
I have already created a content type for: Products, Solutions and Blog Posts, since these seemed the most straight forward entities. But i still have some problems:
Looking through the forums, i will probably have to either create the menu as a content type or define within my application. Since its a multi language website, it should probably be defined preferably by a content type ‘menu’?
Landing Page & Other pages:
Essentially, the landing page is a set of ‘Modules’, which could be used on any page, each consisting of multiple different fields e.g. a carousel or a specific list…
Which brings me to my main Problem i am facing: How do i define content types for my pages, to allow them to be used as flexible as possible and how would i define my pages in general? Or should i just create a new content type for each page?
Looking at the Look Book example, creating a page entity would make sense. This page entity should have a title, slug, flag: homepage: (true, false) following the content which consists of a list of references to ‘Modules’ which can be ordered. Is it possible to create something like a Parent -> Child relationship within pages to structure them as well?
Now, since the layout for each Page is a little bit different: How can i restrict the usage of different modules for each page to prevent my ‘layouts’ from breaking? Can i somehow limit the choice of ‘Modules’ based on the selection of a layout (or Entity, which can be selected from a predefined list since layouts are usually associated with a page entity ?)
Thanks for your time and help,
much appreciate it
My current content models look like this:
At the Moment i am not sure if ‘slots’, as described in the blog post and as used by my current model will introduce to much flexibility. I want content creators to ‘reuse’ existing Models (which consist of multiple slots).
In addition, i might have to create a new content type for more specific slots. For example: slot-text, slot-text-image, slot-cta, etc.
For a maximum of flexiblity it would be possible to define every available Field as a contentent type and wrap them together as a list of references which would define different kinds of ‘slots’.
The goal should be to present editors with some flexiblity but necessarily to overwhelm them with so many levels of content.