- ~site: is used to refer to current site URL.
- ~sitecollection: is used to refer the current site collection URL
- ~layouts: is used to refer the /_layouts/15 folder also know as 15 hive.
- ~sitecollection/style library/file name.js
We also call it as relative path, I have seen developers providing absolute (fixed) path instead of related path. This happen mostly when they are inside a sub site so make sure to use ~site for referring lists This is one of the very basic thing but sometime we do not have idea and find it difficult to get it. I have seen this question on couple of forums so decided to write a small post about it.
Latest posts by Adnan Amin (see all)
- Five ways to get OneDrive URL for a User in Microsoft 365 - March 1, 2020
- OneDrive Sync issue: SharePoint Documents Library not syncing - February 12, 2020
- Teamwork in Microsoft 365 - September 18, 2019