SOLVED

SharePoint frameworks

Copper Contributor

Is there any suggestions on retrieving current site page title using Page context object rather going with API

6 Replies
If I understand correctly, you want to retrieve host page right ?

Contextual information for the SharePoint site ("SPWeb") that is hosting the page.
your page tile is going to be same under the site...

Please refer this let me know.

https://docs.microsoft.com/en-us/javascript/api/sp-page-context/pagecontext?view=sp-typescript-lates...

yes i can agree to take this for retrieving current site title or site related details etc, but the required thing is need to take current site page Title.

 

Under Site contents > Under Site Page > Create a site page and need to check for displaying the site page title with respect to page context than going with API

best response confirmed by Devanandrk (Copper Contributor)
Solution
Oh PAGE TITLE :) then I do not think another way than using API for now.
thanks for the response! Hope you are aware of SPFX webpart

How to clear this CORS error as follows

"Access to XMLHttpRequest at 'https://centralindia0-completenessp.svc.ms/api/collection' from origin 'https://avasoft992.sharepoint.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

Thanks in advance!
Could you please start the new thread for this and Could you please mark the current thread as the solution to your question?

@Devanandrk  Where you able to resolve the CORS issue

1 best response

Accepted Solutions
best response confirmed by Devanandrk (Copper Contributor)
Solution
Oh PAGE TITLE :) then I do not think another way than using API for now.

View solution in original post