DEV Community

MANOJ AP
MANOJ AP

Posted on • Edited on

Prismic Slices

Prismic

Prismic is a headless CMS for developing sophisticated web and E-commerce apps. It is a custom type based API with cloud hosting feature, plus a easy to use content editor.

What is a slice in Prismic ?

Slices

Slices can think of code block in a block editor , for example paragraph in WordPress block editor. In Prismic while creating custom types we can switch on the slices, can add the optional reusable slices come with the CMS or we can create our own. These are optional fields in prismic types

Slices are optional fields in Prismic, they can be placed from slices gallery.

Types

Slices have two section repeatable and none repeatable section. Repeatable section can have multiple elements of same type, for instance the images.

where the slices stored ?

Slices will be stored in data.body key as n array.

How to render

We can render the slices as regular component but Vue offers a prismic slize-zone for dynamic handling of slices. Alternatively we can use Vue's dynamic component approach.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay