The "Custom Fund Landing Page" content type on the Giving site is really just a page with a "listing component" that displays funds. To complete the migration of that content type, a separate "Landing Page" model would need to be created, or probably better yet, it's time to add the concept of layouts.
The Page model can have a Layout attached to it in a one-to-one relationship where a Layout belongs to a Page and a Page has one Layout. The layout will be displayed at /pages/[slug]/layout.
The Layout consists of Components through a Placement relationship. A Placement can store positional information not specific to any component. This also allows components to be placed in many layouts.
Acceptance Criteria
[ ] Layout model added with relationships to Page and also Component via Placement
[ ] Component model created with type:string props:jsonb and relationship to Placement. Will need to flesh out how components are created and stored better, but a form into JSON can work and be flexible for now.
[ ] Placement model created with relationship to Component and Page.
Next Issue
I'm sure the way layouts work will change as the concepts and code are fleshed out, but too murky to tell anything more right now.
The "Custom Fund Landing Page" content type on the Giving site is really just a page with a "listing component" that displays funds. To complete the migration of that content type, a separate "Landing Page" model would need to be created, or probably better yet, it's time to add the concept of layouts.
The Page model can have a Layout attached to it in a one-to-one relationship where a Layout belongs to a Page and a Page has one Layout. The layout will be displayed at
/pages/[slug]/layout
.The Layout consists of Components through a Placement relationship. A Placement can store positional information not specific to any component. This also allows components to be placed in many layouts.
Acceptance Criteria
type:string props:jsonb
and relationship to Placement. Will need to flesh out how components are created and stored better, but a form into JSON can work and be flexible for now.Next Issue
I'm sure the way layouts work will change as the concepts and code are fleshed out, but too murky to tell anything more right now.