System variables for use in templates
In addition to the variables that you define on your own, using the Genesis:UserInput section, the following variables will always be available for use within templates. Support for these variables was added in Genesis version 2.1.0.0028:
|genesis_system_username||Username of the logged-in user, i.e. "webmaster" or "bob".|
|genesis_system_email_address||Email address of the logged-in user, from the My Account page.|
|genesis_system_full_name||Full name of the logged-in user, from the My Account page. Note that this variable may be blank if the user has not entered a name.|
|genesis_system_cwd||A string representing the current working directory relative to the user's Base URL. If the user has not navigated to a different folder than his starting Base URL, then this variable will be a blank string. If the user's Base URL is "http://foo.tld/" and the user has navigated to "http://foo.tld/images/logos/", then this string will contain "images/logos". Any leading or trailing slashes are suppressed.|
|genesis_system_base_url||The Base URL of this user's account, i.e. http://foo.tld/ from the example above.|
The URL to the Genesis script, with query string added. If the user is logged in without cookies, such that all auth tokens are stored in the query string, then the user's auth token will be present here. Examples are "http://foo.tld/genesis/index.pl?" and "http://foo.tld/genesis/index.pl?web_auth_cp=XDerwy&".
Because this variable may contain an auth token, do NOT use this variable in your Genesis:File outputs. It should only be used within Genesis:UserInput when you are referencing other areas of the product for the benefit of the author. For example, you might say "in addition to the form fields you just entered, this template uses your system email address and full name, which you can enter at /cgi-bin/webmaster/index.pl?Action=MA.
|genesis_system_template_raw||The name of the current template file, i.e. "Foo_Site.template" or "XYZ/T01.Foo_Site_no_include.template". Includes any subfolder information and special tokens.|
|genesis_system_template_human||The name of the current template, after special tokens have been removed, i.e. "Foo Site".|
An example of using these variables would be:
<p>[ this goes in the footer of each page ]</p>
<p><small>This web site was created using the way-cool Genesis
template named Publish/Gen_ex20_pages.template (also known as
Publish / Gen ex20 pages). The fields were entered by user
mygenhelp whose email address is email@example.com
and whose full name is
<% if genesis_system_full_name %>MyGenesis Help<% end if %>
<% if not genesis_system_full_name %>unknown to me<% end if %>
<p><small>My main URL is http://www.my-genesis.com/help/.
<% if genesis_system_cwd %> As you can see, though, this page is
located in my subfolder.<% end if %></small></p>
Genesis also supports a few similar variables that are only defined in the optional Genesis:Finish block. See Customizing the "template finished" page.