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

Omni CMS XSLT Variables

Omni 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 Omni CMS XSLT variables.

VariableDescriptionOutput
ou:action

Assesses the current state of an Omni CMS file. There are four possible states within Omni 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 Omni 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 Omni 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 Omni 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 Omni 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 Omni 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 Omni 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"/>
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 Omni 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.

/usr/local/omnicms/www/
/usr/local/omnicms/www/
ou:site

Outputs the name of the current site.

/usr/local/omnicms/www/
/usr/local/omnicms/www/
ou:stagingpath

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

/usr/local/omnicms/www/
/usr/local/omnicms/www/
ou:path

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

/usr/local/omnicms/www/
/usr/local/omnicms/www/
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 Omni CMS. In this case, the name of the primary production server shares the same name with the Omni CMS staging server.

/usr/local/omnicms/www/
/usr/local/omnicms/www/
ou:uuid

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

/usr/local/omnicms/www/
/usr/local/omnicms/www/