Modern Campus Catalog Emblem Modern Campus CMS Emblem Modern Campus Curriculum Emblem Modern Campus Involve Emblem Modern Campus Lifelong Learning Extended Education Emblem Modern Campus Message Emblem Modern Campus Navigate Emblem Modern Campus Schedule Emblem Modern Campus Virtual Tours & Maps Emblem Modern Campus Lifelong Learning Workfore and Community Emblem Site Menu Open Site Menu Close

Modern Campus CMS XSLT Variables

Modern Campus CMS implementations have a number of predefined XSLT variables to streamline the XSL development process. These variables are called upon throughout standard implementation XSL files and can be utilized in user-generated XSLT code. The following is a selection of commonly used Modern Campus CMS XSLT variables.

VariableDescriptionOutput
ou:action

Assesses the current state of an Modern Campus CMS file. There are four possible states within Modern Campus CMS: preview (prv), publish (pub), edit (edt), and compare (cmp). By using ou:action, you can specify different code blocks to display based upon the state of the file by defining <xsl:if> and <xsl:otherwise> elements.

For example, on a page which uses server side scripting to display a feed, within Modern Campus CMS you could fetch the output of the script when in preview, edit, or compare, but include the actual PHP call code block when the page is published.

<xsl:param name="ou:action" />
<xsl:choose>
	<xsl:when test="not($ou:action='pub')">
		<xsl:value-of disable-output-escaping="yes" select="unparsed-text('http://gallenauniversity.com/_resources/php/mrss.php')"/>
	</xsl:when>
	<xsl:otherwise>
		include ($_SERVER['DOCUMENT_ROOT']. "/_resources/php/mrss.php")
	</xsl:otherwise>
</xsl:choose>
ou:dirname

Outputs the current directory name.

<xsl:param name="ou:dirname" />
<xsl:value-of select="$ou:dirname"/>
/academics
ou:feed

Outputs the RSS feed from the page access settings for a particular file.

<xsl:param name="ou:feed" />
<xsl:value-of select="$ou:feed"/>
/rss/news.xml
ou:filename

Outputs the name of the publish product of the current file found on the production server.

<xsl:param name="ou:filename" />
<xsl:value-of select="$ou:filename"/>
index.html
ou:firstname

Outputs the active first name listed in the Modern Campus CMS user's profile.

<xsl:param name="ou:firstname" />
<xsl:value-of select="$ou:firstname"/>
Jane
ou:lastname

Outputs the active last name listed in the Modern Campus CMS user's profile.

<xsl:param name="ou:lastname" />
<xsl:value-of select="$ou:lastname"/>
Smith
ou:username

Outputs the active username listed in the Modern Campus CMS user's profile.

<xsl:param name="ou:username" />
<xsl:value-of select="$ou:username"/>
jsmith
ou:email

Outputs the active email address listed in the Modern Campus CMS user's profile.

<xsl:param name="ou:email" />
<xsl:value-of select="$ou:email"/>
example@school.edu
ou:ftpdir

Outputs the subdirectory of the FTP home where Modern Campus CMS users are placed by default.

<xsl:param name="ou:ftpdir" />
<xsl:value-of select="$ou:ftpdir"/>
/public_html
ou:ftphome

Outputs the FTP home defined in the site settings.

<xsl:param name="ou:ftphome" />
<xsl:value-of select="$ou:ftphome"/>
/public_html
ou:ftproot

Outputs the FTP root defined in the site settings.

<xsl:param name="ou:ftproot" />
<xsl:value-of select="$ou:ftproot"/>
/public_html
ou:httproot

Outputs the HTTP root defined in the site settings.

<xsl:param name="ou:httproot" />
<xsl:value-of select="$ou:httproot"/>
https://www.gallenauniversity.com/
ou:created

Outputs the timestamp of when the file was created.

<xsl:param name="ou:created" as="xs:dateTime"/>
<xsl:value-of select="$ou:created" />
2019-06-13T22:08:00Z
ou:modified

Outputs the timestamp of when the file was last modified.

<xsl:param name="ou:modified" as="xs:dateTime"/>
<xsl:value-of select="$ou:modified"/>
2019-06-13T22:08:00Z
ou:root

Outputs the path from the system root in Modern Campus CMS.

<xsl:param name="ou:root" />
<xsl:value-of select="$ou:root"/>
/usr/local/omnicms/www/
ou:servername

Outputs the domain of the host server.

<xsl:param name="ou:servername" />
<xsl:value-of select="$ou:servername"/>
a.cms.omniupdate.com
ou:site

Outputs the name of the current site.

<xsl:param name="ou:site" />
<xsl:value-of select="$ou:site"/>
gallena
ou:stagingpath

Outputs the root-relative path to a file on the staging server.

<xsl:param name="ou:stagingpath" />
<xsl:value-of select="$ou:stagingpath"/>
/about/index.pcf
ou:path

Outputs the root relative path to the publish product on the production server.

<xsl:param name="ou:path" />
<xsl:value-of select="$ou:path"/>
/about/index.html
ou:target

Outputs the site name of the production server where the published page is located. This variable is used when there are multiple publish targets set up within Modern Campus CMS. In this case, the name of the primary production server shares the same name with the Modern Campus CMS staging server.

<xsl:param name="ou:target" />
<xsl:value-of select="$ou:target"/>
development
ou:uuid

Outputs the unique identifier for the current file. This unique identifier doesn't change when a file is moved or renamed.

<xsl:param name="ou:uuid" />
<xsl:value-of select="$ou:uuid"/>
34318d7b-ec29-4113-8204-3d9b9a6dfde9

By continuing to use this site, you agree to the storing of first- and third-party cookies on your device to enhance site navigation; analyze site, product, and service usage; and assist in our marketing and promotional efforts. Cookie Policy