You are here

Site object

The site object provides the following properties and methods.

Properties

description
The displayable description of the site
isPublic
Whether the site is public or not (true or false)
node
The site node (null if there are none)
shortName
A read-only unique short name identifying the site
siteGroup
The site group name
sitePermissionGroups
A map of role name mapped to associated group name
sitePreset
A read-only name of the site preset used to create the site
title
The displayable title of the site
visibility
The visibility of the site (PUBLIC_SITE, MODERATED_SITE, PRIVATE_SITE)

Example

    var site = siteService.getSite("simple-site");

    if(site){
        
        model.sitePreset = site.sitePreset;
        model.shortName = site.shortName;
        model.title = site.title;
        model.description = site.description;
        model.isPublic = site.isPublic;
        model.visibility = site.visibility;
        model.node = site.node;
        model.siteGroup = site.siteGroup;
        model.sitePermissionGroups = site.sitePermissionGroups;
        model.customProperties = site.customProperties;
    }