Retired Documentation: You are using the documentation for version 1.7.3 which was retired in 2013. Go here for the latest version documentation or check here for your available upgrades to the latest version.
Path.php Global Variables
Within your path.php file, you can create global variables that are available to any Templates accessed through its associated index.php page (or whatever it might have been renamed).
Defining Variables
You may specify a PHP array containing "global variables" that will be available only to Templates accessed through that path.php file.
$global_vars = array(); // This array must be associative
For instance, let's say you want to define a weblog name and a Template Group name. You could use this:
$global_vars = array(
"my_weblog_name" => "news",
"my_template_group" => "display"
); // Last entry must not include the comma at the end
Within your Templates, you would then be able to use the {my_weblog_name} and {my_template_group} variables.
Using Conditionals
Global variables defined in the path.php file can be used in conditional statements within your Templates. For instance:
{if my_template_group == "display"}
Hey, it's the 'display' Template!
{/if}
In addition, they may be used with multiple conditions as described in the Conditional Global Variables page.
NOTE: It is not recommended that path.php global variables be used to hold HTML, ExpressionEngine tags, or PHP, as these and all inputted variables are sanitized for security reasons.