Variables for use in template.html

The main look-and-feel of MyGenesis is controlled by the following template file:

	genesis/script_data/templates/template.html

The following variables can be used anywhere within the file:

%script_output%

Required variable. This contains all of the script output. The output will fit within a 700-pixel-wide table cell.



%title%

A string to be placed within the <title> tag. The string is somewhat context-sensitive, i.e. the title will be "Genesis - List Templates" in Template Editor mode, etc. This variable may be removed in a future release.


%content_type%

Standard Content-Type header, i.e. "text/html; charset=iso-8859-1". This header MUST be present in order to be XHTML compliant. The value of this variable is pulled from the active /$language/strings.txt file, since the charset will typically vary from language to language.


%username%

Value of the logged-in username, i.e. "webmaster" or "bob". Will be a null string if nobody has logged in yet. Added in Genesis 2.1.0.0019.


%days_remaining%

The number of days remaining for this user account before it expires. See "Admin Page" => "Manage Users" => "Edit Profile" => "Account Expiration" to set this value on a per-user basis.

Value will be 0 if nobody has logged in yet, or if the logged-in user does not have a time-sensitive account. By default, none of the accounts are time-sensitive.

Variable added in Genesis 2.1.0.0022.



You can add extra information to the bottom of each Genesis page by using these latter two variables. They should be combined with the conditional syntax, since they're only valid once someone has logged in.

Edit template.html and find the part labeled:

	<hr size="1" />

	

Replace that HTML with:

	<hr size="1" />

	<% if username %>
		<p>You are logged in as %username%.</p>
	<% end if %>

	<% if days_remaining %>
		<p>Your account will expire in %days_remaining% days.
		You must select a paid hosting plan before then.</p>
	<% end if %>

	

The bottom of each page will then say something like:

You are logged in as bob.

Your account will expire in 30 days. You must select a paid hosting plan before then.