How to access columns in prismic custom types

Custom Columns in prismic

prismic has the feature of being able to create various columns/sections in a custom type as shown in the image (i.e, header, footer). how do i fetch data from each column separately?

It really depends on what you need. If the goal is to separate components, like having distinct sections on your page, then Slices are the way to go.

In your screenshot where you have “header” and “footer” those are Tabs in Slice Machine, when you open your Pages to edit them, these help you organize content visually inside the editor and you can add as many as you need

In the API response they’ll appear at the same level as the Static Zone. so if you have 3 tabs and you add Slices inside each tab, the API will just number them slices, slices1, slices2 to keep them separate.

If you want you can share a more specific example of what you’re trying to achieve and i can guide you depending on that

thanks so much i was able to sort this out without much effort.

2 Likes

here’s the finalized website. https://pepsportslimited.com/ thanks very much guys!!!

2 Likes

Looks awesome @ransbort!

1 Like

thanks