I'm working with the React JSS Basic example. I created a new item based on the default "Welcome" component and I'm trying to retrieve it through JSS.
Here is my Sitecore tree :
To get Welcome-1 item (default one) I use this url : http://my-first-jss-app/sitecore/api/layout/render/jss?item=/&sc_apikey=xxx&tracking=false
I try to get Welcome-2 item with different urls but it results in a 404 error. Some urls that I tried :
- http://my-first-jss-app/sitecore/api/layout/render/jss?item=/home/welcome-2&sc_apikey=xxx&tracking=false
- http://my-first-jss-app/sitecore/api/layout/render/jss?item=/welcome-2&sc_apikey=xxx&tracking=false
I already read the layout service documentation that says the path must be “The path to the item, relative to the context site's home item”. This is the case in my urls but it doesn't work.
So I have two questions:
- Why my url to display Welcome-2 item is not correct ?
- Why Welcome-1 item is displayed when I reach “item=/” ?
Thanks