Forum Discussion
amha97
May 07, 2019Copper Contributor
Get items of Site Pages using pnp getByTitle
Hi, I am trying to retrieve Site pages items by using pnp getByTitle, as shown below. let web = new Web (this.context.pageContext.web.absoluteUrl); web.lists.getByTitle('Site Pages').i...
Beau Cameron
May 07, 2019MVP
amha97 Have you read this this documentation? https://pnp.github.io/pnpjs/sp/docs/items/
- amha97May 07, 2019Copper Contributor
Beau Cameron Yes I have read it and as I understand it this
sp.web.lists.getByTitle("My List").items.get().then((items: any[]) => { console.log(items); });
Should work for “Site Pages” also and as I mentioned, when i tried the same thing in my other SharePoint account it did work just fine.