How to create a data model for footer?

Hi there,

so I am currently implementing a footer for our website, but I find it quite difficult to create a data model for a footer.

How it currently looks is like this:

Since we’re rebuilding the page with prismic, a clean structure would be nice, but I am a bit of overwhelmed tbh. Do you have a suggestion?

Thank you!

Hello Andreas, thanks for reaching out!

You can do it in many ways. This is my recommendation :

  1. Create a Singleton Custom type and name it footer

  2. At the top level of the Custom type add one image field for the logo

  3. Add a Slice to create each of the small different sections. This Slice will contain: a Title field in the non-repeatable zone; then an Image field and a Rich text field to the repeatable zone. This structure will allow you to add as many fields ass needed to create the sections: About, Service, 'Versand Durch", etc…

  4. And one last Slice to create the form for the newsletter with a Title field, two Key text fields and one Rich text field.

I’m going to share with you the JSON of this structure so that you can paste it in your Footer Custom type. Try it and see if it works for you:

{
  "Main": {
    "logo": {
      "type": "Image",
      "config": {
        "constraint": {},
        "thumbnails": [],
        "label": "logo"
      }
    },
    "body": {
      "type": "Slices",
      "fieldset": "Slice zone",
      "config": {
        "labels": {
          "sections": []
        },
        "choices": {
          "sections": {
            "type": "Slice",
            "fieldset": "sections",
            "description": "sections",
            "icon": "face",
            "display": "list",
            "non-repeat": {
              "section-title": {
                "type": "StructuredText",
                "config": {
                  "single": "heading1, heading2, heading3, heading4, heading5, heading6",
                  "label": "section-title",
                  "placeholder": "section-title"
                }
              }
            },
            "repeat": {
              "section-img": {
                "type": "Image",
                "config": {
                  "constraint": {},
                  "thumbnails": [],
                  "label": "section-img"
                }
              },
              "section-text": {
                "type": "StructuredText",
                "config": {
                  "multi": "paragraph, preformatted, heading1, heading2, heading3, heading4, heading5, heading6, strong, em, hyperlink, image, embed, list-item, o-list-item, o-list-item",
                  "label": "section-text",
                  "placeholder": "section-text"
                }
              }
            }
          },
          "contact": {
            "type": "Slice",
            "fieldset": "contact",
            "description": "Contact",
            "icon": "call",
            "display": "list",
            "non-repeat": {
              "form-title": {
                "type": "StructuredText",
                "config": {
                  "single": "heading1, heading2, heading3, heading4, heading5, heading6",
                  "label": "form-title",
                  "placeholder": "form-title"
                }
              },
              "email-placeholder": {
                "type": "StructuredText",
                "config": {
                  "multi": "paragraph",
                  "label": "email-placeholder",
                  "placeholder": "email-placeholder"
                }
              },
              "send-button-text": {
                "type": "StructuredText",
                "config": {
                  "multi": "paragraph",
                  "label": "send-button-text",
                  "placeholder": "send-button-text"
                }
              },
              "form-paragraph": {
                "type": "StructuredText",
                "config": {
                  "multi": "paragraph, preformatted, heading1, heading2, heading3, heading4, heading5, heading6, strong, em, hyperlink, image, embed, list-item, o-list-item, o-list-item",
                  "label": "form-paragraph",
                  "placeholder": "form-paragraph"
                }
              }
            },
            "repeat": {}
          }
        }
      }
    }
  }
}
1 Like

This issue has been closed due to inactivity.