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

Directory Variables

Directory variables are custom settings applied to folders that modify the content inside the folder. A common example is if different areas of the site have the same template but different color schemes; a directory variable can be used to choose the color scheme for each section.

Directory variables are available for folder and site access settings and are defined in name-value pairs.

An example of directory variables. The first section says "Variables for this Folder" and is followed by a green "+Add" button, and two pairs of dropdown menus and fields. The first pair reads "Default Image Folder" - "/images" and "personalization" - "athletics." The second section reads "Inherited Variables" and has a greyed-out pair that reads "Default Image Folder" - "/images"

Directory variables are always applied recursively, so editing a directory variable for /academics, for example, applies that variable to any subfolders of /academics as well. Typically, directory variables are custom-made for each institution and their functionality may differ from implementation to implementation. More can be created at any time.

A folder inherits any directory variables from its parent folder (and the folder above that, and above that). These show under "Inherited Variables" and are greyed-out. Inherited variables can't be edited, but they can be overwritten by adding the same variable to that folder and entering a different value.

Three directory variables are included with every installation of OU Campus. They only need to be adjusted in access settings, and don't require any source code editing.

Default Image Folder (formerly ox_ftp_image_root)Root- or page-relative path to the image folder, no trailing slash (e.g. /images/campus-life)When users are inserting an image, they start in that folder by default when choosing the image.
Default Media Folder (formerly ox_ftp_media_root)Root- or page-relative path to the media folder, no trailing slash (e.g. /videos/promotional)When users are inserting a video or other media, they start in that folder by default when choosing the media.
PublishAdd skip: and make a comma-separated list of file extensions (e.g. skip:xml,xsl,tcf,tmpl)Excludes any files with the the defined file extensions from being published when the folder containing them is published.

Custom variables can also be defined. The functions and values must first be declared in TMPL/XSLs before the directory variable defined in access settings will have meaning.