Posts

Showing posts with the label Headless development

More GraphQL Query Example In Sitecore JSS

Image
Hello everyone. In this blog we will see more example of writing GraphQL queries. This is continue part of my previous blog which you can find here So let's start without wasting any extra time. Below is the Sitecore structure which we will be using in our case. Let me give you an overview. We are having going to read children of Social Links folder. There are links item created from two different template. One is Social Link and another one is Footer Link. This is just for example purpose. Social Link template has one Image field named as logo. Below is the screenshot for your reference. Reading Children of Item passed as query parameter in GraphQL If you see above query, we are passing datasource and language as Paramter. Then we are calling children which is responsible for getting all Sitecore items under result object.We are just showing the template name and item name from the result Reading Children of of Item passed as Query in GraphQL with template id filter If y...

Creating First Headless component - Sitecore Next JS

Image
Hello everyone, As my learing continues in Sitecore Headless, In this blog we will see how we can create component in Sitecore Headless Next JS. We will take an example of how we can create a Footer component . Also we will try to use all Sitecore fields that are mostly use in our day to day work and how we can render those fields(Rich Text, Link, Multilist, Image, Dictionary etc.) in Headless development. Let's describe the footer component. It has fields mentioned. Footer Label, FooterLogo with Link, Description and List of external links. Footer Label : Dictionary Item FooterLogo : (Image) with Link :(General Link) Description: (Richtext) List of external links : (Multilist) Lets see the Sitecore Structure: Templates Renderings Datasoure Item Placeholder Settings Home Item Presentation Details once we add the component, we can check the same in Layout Service. Layout Service Now after verifying the component in Layout service, its time to build the read t...