Page tree
Skip to end of metadata
Go to start of metadata

sitefn templating functions provide information about the current site. You can access the Site object and the Theme currently applied to the site.

Get the current site

Gets the current Site.

Method signature

Site site()

Arguments

none

Returns

Returns the current Site.

Usage

sitefn.site()

 [#assign mySite=sitefn.site()]

Get the site of the passed content

Gets the Site of the passed content.

Method signature

Site site(ContentMap content)

Arguments

content

required

The content map whose site you want to get.

Returns

Returns the Site of the passed ContentMap.

Usage

sitefn.site(content)

 [#assign currentSite = sitefn.site(content)]

Related functions

Get a site's theme

Gets the Theme of a Site.

Method signature

Theme theme(Site site)

Arguments

site

required

The site whose theme you want to get.

Returns

Returns a site's Theme.

Usage

sitefn.theme(site)

 [#assign currentTheme=sitefn.theme(sitefn.site(content))]