TreeINFO-For-M365 documentation
    Preparing search index...

    Provides quick access to the most commonly used SharePoint page context values.

    // Build a server-relative list URL without hardcoding the site path
    var list = tisa.sp.web.getList(tisa.page.serverRelativeUrl + "/Lists/Ciselnik");
    // Use the list ID of the currently open list
    var listId = tisa.page.listId;

    Hierarchy

    • BaseService
      • Page

    Implements

    • IPageService
    Index

    Properties

    listId: undefined | string

    GUID of the currently open list or library as a string. undefined when the page is not in a list context.

    var listId = tisa.page.listId;
    
    listServerRelativeUrl: undefined | string

    Server-relative URL of the currently open list or library (e.g. /sites/myweb/Lists/Ciselnik). undefined when the page is not in a list context.

    var list = tisa.sp.web.getList(tisa.page.listServerRelativeUrl);
    
    serverRelativeUrl: string

    Server-relative URL of the current web (e.g. / or /sites/myweb). Use this to build server-relative paths to lists and libraries on the current web.

    var list = tisa.sp.web.getList(tisa.page.serverRelativeUrl + "/Lists/Ciselnik");
    
    siteUrl: string

    Absolute URL of the current site collection (e.g. https://tenant.sharepoint.com/sites/myweb). Differs from webUrl when working inside a subsite.

    var siteUrl = tisa.page.siteUrl;
    
    webUrl: string

    Absolute URL of the current web (e.g. https://tenant.sharepoint.com/sites/myweb).

    var webUrl = tisa.page.webUrl;