Shantha Kumar T
Updates to _spPageContextInfo
There is a variable called “_spPageContextinfo
” available in all SharePoint pages, which provides some basic properties of the SharePoint site based on the current context.
I have given below some useful links available across the internet explains the properties with examples,
http://blah.winsmarts.com/2013-2-_sppagecontextinfo_is_your_new_best_friend.aspx
http://www.c-sharpcorner.com/blogs/sharepoint-hidden-gems-sppagecontextinfo1
Using _spPageContextInfo to Determine the Current SharePoint Context in Script
But the above links explained the variable till SharePoint 2013, but SharePoint online updated with some properties to this _spPageContextinfo variable. Maybe this can be included in SharePoint 2016 also (yet to test in SP2016).
The new properties are added to _spPageContextInfo in SharePoint online are given below,
Name | Example |
---|---|
env | prod |
hasManageWebPermissions | true |
isAppWeb | false |
isSiteAdmin | true |
updateFormDigestPageLoaded | new Date(“2016-03-10T04:38:26.3177025Z”) |
userLoginName | admin@sharepointsite.onmicrosoft.com |