sitefn

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

Sitesite()

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

Sitesite(``ContentMapcontent)

Arguments

Argument Description

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)]

Get a site’s theme

Gets the Theme of a Site.

Method signature

Themetheme(``Sitesite)

Arguments

Argument Description

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))]
Related topics
Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the DX Core docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules