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

 
Skip to Content

OU Campus XSLT Variables

OU Campus 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 OU Campus XSLT variables.

Variable Description Output
ou:action

Assesses the current state of an OU Campus file. There are four possible states within OU Campus: 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 OU Campus 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 OU Campus 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 OU Campus user's profile.

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

Outputs the active username listed in the OU Campus 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 OU Campus 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 OU Campus 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"/>
http://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 OU Campus.

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

Outputs the domain of the host server.

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

Outputs the name of the current site.

<xsl:param name="ou:site" />
<xsl:value-of select="$ou:site"/>
www
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"/>
/academics/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"/>
/academics/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 OU Campus. In this case, the name of the primary production server shares the same name with the OU Campus staging server.

<xsl:param name="ou:target" />
<xsl:value-of select="$ou:target"/>
publish_target
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"/>
1a0e54b0-fa7a-4a1d-8d7e-fd39749b9192