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.
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
||Root- or page-relative path to the image folder, no trailing slash (e.g.
||When users are inserting an image, they start in that folder by default when choosing the image.|
|Default Media Folder (formerly
||Root- or page-relative path to the media folder, no trailing slash (e.g.
||When users are inserting a video or other media, they start in that folder by default when choosing the media.|
|Publish||Add skip: and make a comma-separated list of file extensions (e.g.
||Excludes the defined file extensions from being published when the folder is.|
Custom variables can also be defined. The functions and values must first be declared in TMPL/XSLs before the directory variable can be added in access settings.