BASICS

ADMINISTRATION

DEVELOPMENT

SUPER ADMIN

  LAST UPDATED
8/23/2013

System-level Parameters

OU Campus provides a number of XSLT system variables that allow developers to create powerful and robust XSL templates. The are used in conjunction with the xsl:param.

ou:action

The ou:action variable allows developers to determine the current state of the document in OU Campus. There are four states in the OU Campus system, preview (prv), publish (pub), edit (edt), and compare (cmp). With the ou:action variable, developers can choose to provide different code blocks at different stages of a page. 

<xsl:param name="ou:action" />

<xsl:if test="$ou:action='prv'">

     This is preview mode.

</xsl:if>

The following example shows the use of XSL to fetch the output of an executed PHP script in preview, edit, and compare. When the page is being published, the XSL code outputs the PHP call that performs the same operation on the production server.

<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:root

The ou:root variable allows users to determine the path from the system root in OU Campus.

<xsl:param name="ou:root" />

<xsl:value-of select="$ou:root"/>

<!--Output: /usr/local/oucampus/main_site/ -->

ou:site

The ou:site variable outputs the name of the existing site.

<xsl:param name="ou:site" />

<xsl:value-of select="$ou:site"/>

<!--Output: main_site -->

ou:target

The ou:target variable gives the site name of the server that the page is published to. (Note: the name given to the Primary Server is the same as the site in OU Campus). Used with Multi-Target Publish.

<xsl:param name="ou:target" />

<xsl:value-of select="$ou:target"/>

<!--Output: publish_target -->

ou:path

The ou:path variable outputs the location of the working PCF file.

<xsl:param name="ou:path" />

<xsl:value-of select="$ou:path"/>

<!--Output: /level1/index.html -->

ou:dirname

The ou:dirname variable outputs the location of the existing working folder.

<xsl:param name="ou:dirname" />

<xsl:value-of select="$ou:dirname"/>

<!--Output: /level1 -->

ou:filename

The ou:filename variable outputs the name of the output file. 

<xsl:param name="ou:filename" />

<xsl:value-of select="$ou:filename"/>

<!--Output: index.html (from index.pcf)-->

ou:httproot

The ou:httproot variable outputs the HTTP root defined in the site setup.

<xsl:param name="ou:httproot" />

<xsl:value-of select="$ou:httproot"/>

<!--Output: http://www.gallenauniversity.com/ -->

ou:ftproot

The ou:ftproot variable outputs the FTP root defined in the site setup. 

<xsl:param name="ou:ftproot" />

<xsl:value-of select="$ou:ftproot"/>

<!--Output: /public_html -->

ou:ftphome

The ou:ftphome variable outputs the FTP root defined in the site setup.

<xsl:param name="ou:ftphome" />

<xsl:value-of select="$ou:ftphome"/>

<!--Output: /public_html -->

ou:ftpdir

The ou:ftpdir variable outputs the FTP home defined in the site setup. 

<xsl:param name="ou:ftpdir" />

<xsl:value-of select="$ou:ftpdir"/>

<!--Output: /public_html -->

ou:username

The ou:username variable outputs the user’s username.

<xsl:param name="ou:username" />

<xsl:value-of select="$ou:username"/>
<!--Output: jdoe -->

ou:lastname

The ou:lastname variable outputs the user’s last name. 

<xsl:param name="ou:lastname" />

<xsl:value-of select="$ou:lastname"/>

<!--Output: Doe -->

ou:firstname

The ou:firstname variable outputs the user’s first name.

<xsl:param name="ou:ftphome" />

<xsl:value-of select="$ou:ftphome"/>

<!--Output: John -->

ou:email

The ou:email variable outputs the user’s email address. 

<xsl:param name="ou:email" />

<xsl:value-of select="$ou:email"/>

<!--Output: jdoe@gallenauniversity.com -->

ou:feed

The ou:feed variable outputs the RSS feed assigned to a document (if any).

<xsl:param name="ou:feed" />

<xsl:value-of select="$ou:feed"/>

 <!--Output: /rss/feed.xml -->

ou:modified

The ou:modified variable outputs the most recent modified date of a document. 

<xsl:param name="ou:modified" />

<xsl:value-of select="$ou:modified"/>

<!--Output: 2011-11-21T22:08:00Z -->

The values for ou:site, ou:ftproot, ou:httproot, ou:ftphome, and ou:ftpdir originate from the site record as the screenshot highlights:

System-level Parameters


Was this page helpful?

Additional Comments:


(Include your email address if you would like a reply)

Procede to http://support.omniupdate.com/