Site-wide Variables
Server Variables
Examples are from the URL https://www.myschool.edu/folder/my-page/?foo=bar
Variable | Code | Example |
---|---|---|
server_host |
<xphp var="server_host" />
|
www.myschool.edu |
server_path |
<xphp var="server_path" />
|
/folder/my-page/index.php |
server_file server_basename |
<xphp var="server_file" /> <xphp var="server_basename" />
|
index.php |
server_filename |
<xphp var="server_filename" />
|
index |
server_extension |
<xphp var="server_extension" />
|
php |
server_dirname |
<xphp var="server_dirname" />
|
/folder/my-page |
server_request_uri |
<xphp var="server_request_uri" />
|
/folder/my-page/?foo=bar |
server_query_string |
<xphp var="server_query_string" />
|
foo=bar |
Note: The special variable <xphp var="server_path_flat" />
returns the contents of server_dirname
but with /
replaced with -
. This has been used in some legacy Jumpchart integrations and may not be too useful nowadays.
Page Variables
Variable | Description | Code |
---|---|---|
page_title | Page title of current page |
<xphp var="page_title" />
|
page_last_modified | Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) |
<xphp var="page_last_modified" />
|
page_last_editor | Name of user who last edited |
<xphp var="page_last_editor" />
|
page_description | Description |
<xphp var="page_description" />
|
page_keywords | List of keywords |
<xphp var="page_keywords" />
|
page_tags | List of tags selected |
<xphp var="page_tags" />
|
Group Variables
Variable | Description | Code |
---|---|---|
group_title |
Group title (uses “Public Name” if group has one, otherwise uses the back-end group name) |
<xphp var="group_title" />
|
group_directory | Name of group directory |
<xphp var="group_directory" />
|
group_fullname |
Full name of group (always uses back-end group name) |
<xphp var="group_fullname" />
|
group_link | Path to group |
<xphp var="group_link" />
|
group_gid | Numeric value of the Group ID |
<xphp var="group_gid" />
|
group_navigation |
<xphp var="group_navigation" />
|
|
group_breadcrumb |
<xphp var="group_breadcrumb" />
|
|
group_twitter_name |
<xphp var="group_twitter_name" />
|
|
group_twitter_link |
<xphp var="group_twitter_link" />
|
|
group_twitter_feed |
<xphp var="group_twitter_feed" />
|
|
group_facebook_name |
<xphp var="group_facebook_name" />
|
|
group_facebook_link |
<xphp var="group_facebook_link" />
|
|
group_facebook_feed |
<xphp var="group_facebook_feed" />
|
|
group_instagram_name |
<xphp var="group_instagram_name" />
|
|
group_instagram_link |
<xphp var="group_instagram_link" />
|
|
group_instagram_feed |
<xphp var="group_instagram_feed" />
|
Note: Groups that use the main navigation of another group also inherit all group_*
variables from that group.
Using Page and Group Variables in an include:
When using a file widget, LiveWhale will include the full source code into your page, meaning you can use context-specific variables like <xphp var="group_title"/>
. However, when you append any GET variables (?foo=bar) to a file widget path, LiveWhale will instead make an HTTP request for that URL and then use the response, meaning context-specific variables like <xphp var="group_title"/>
won’t work in that include, since LiveWhale doesn’t see /_ingredients/includes/my-include.php as belonging to any particular group.
Time
Variable | Code | Example |
---|---|---|
server_date_month |
<xphp var="server_date_month" />
|
September |
server_date_month_numeric |
<xphp var="server_date_month_numeric" />
|
9 |
server_date_day |
<xphp var="server_date_day" />
|
Monday |
server_date_day_of_year |
<xphp var="server_date_day_of_year" />
|
255 |
server_date_date |
<xphp var="server_date_date" />
|
12 |
server_date_year |
<xphp var="server_date_year" />
|
2022 |
server_date_full |
<xphp var="server_date_full" />
|
Monday, September 9, 2022 |
server_time_full_12 |
<xphp var="server_time_full_12" />
|
1:44pm |
server_time_full_24 |
<xphp var="server_time_full_24" />
|
13:44pm |
server_time_hour_12 |
<xphp var="server_time_hour_12" />
|
1 |
server_time_hour_24 |
<xphp var="server_time_hour_24" />
|
13 |
server_time_minute |
<xphp var="server_time_minute" />
|
44 |
server_time_ampm |
<xphp var="server_time_ampm" />
|
pm |
server_time_timezone |
<xphp var="server_time_timezone" />
|
EDT |
Tags
Variable | Description | Code |
---|---|---|
tag_title | Returns only the title of tag |
<xphp var="tag_title" />
|
tag_links | Returns the tag link |
<xphp var="tag_links" />
|
Details Template Variables
Please note, XPHP variables for details pages are prefixed with details_. If your site was built using LiveWhale 1.6 or before, you may see in your details templates some variable prefixed with events_, forms_, news_, etc. However, since LiveWhale 1.6.1, details_ is the correct prefix for those variables (others are supported for backwards compatibility).
Events
Variable | Description | Code |
---|---|---|
id | Events ID (ex., 4) |
<xphp var="details_id" />
|
parent | The ID of the parent event, in the case of a shared or linked copy |
<xphp var="details_parent" />
|
gid | Group ID |
<xphp var="event_gid" />
|
title | Title of event |
<xphp var="details_title" />
|
status | Hidden or Live Status is returned |
<xphp var="details_status" />
|
is_canceled | Returns true or false is event is cancelled |
<xphp var="details_is_canceled" />
|
summary | Summary |
<xphp var="details_summary" />
|
description | Description |
<xphp var="details_desciption" />
|
views | Number of views |
<xphp var="details_views" />
|
date_dt | 2014-11-22 14:00:00 |
<xphp var="details_date_dt" />
|
date2_dt | 2014-11-22 17:00:00 |
<xphp var="details_date2_dt" />
|
timezone | Timezone |
<xphp var="details_timezone" />
|
is_all_day | Returns true/false if event is all day |
<xphp var="details_is_all_day" />
|
repeats | Returns true/false if a repeating event |
<xphp var="details_repeats" />
|
repeats_from | Starting date (2014-11-22 14:00:00) |
<xphp var="details_repeats_from" />
|
repeats_until | Ending date (2014-11-29 14:00:00) |
<xphp var="details_repeats_until" />
|
repeats_occurrences |
<xphp var="details_repeats_occurrences" />
|
|
has_registration | Returns true or false if there is registration |
<xphp var="details_has_registration" />
|
registration_owner_email | Email of registration owner |
<xphp var="details_registration_owner_email" />
|
has_wait_list | Returns true/false if event has a waiting list |
<xphp var="details_has_wait_list" />
|
last_modified | Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) |
<xphp var="details_last_modifed" />
|
url | URL to event |
<xphp var="details_url" />
|
source |
<xphp var="details_source" />
|
|
cost | Cost of event |
<xphp var="details_cost" />
|
contact_info | Contact Information |
<xphp var="details_contact_info" />
|
is_starred | Returns true/false if event is starred |
<xphp var="details_is_starred" />
|
subscription_id | Subscription ID |
<xphp var="details_subscription_id" />
|
subscription_status |
<xphp var="details_subscription_status" />
|
|
location | Location title and address |
<xphp var="details_location" />
|
location_latitude | Latitude coordinate of locations (ex., 41.40338) |
<xphp var="details_location_latitude" />
|
location_longitude | Longitude coordinate of locations (ex., 2.17403) |
<xphp var="details_location_longitude" />
|
tags | List of tags selected |
<xphp var="details_tags" />
|
image |
<xphp var="details_image" />
|
|
group_title |
<xphp var="details_group_title" />
|
|
has_comments |
<xphp var="details_has_comments" />
|
|
registration_instructions |
<xphp var="details_registration_instructions" />
|
|
registration | Displays registration instructions, registration form, and any additional RSVP forms that are attached (1.6+) |
<xphp var="details_registration"/>
|
is_paid | True/false if this is a paid event |
<xphp var="details_is_paid" />
|
payment_price | Cost of event |
<xphp var="details_payment_price" />
|
payment_method | Method of payment |
<xphp var="details_payment_method" />
|
style |
<xphp var="details_style" />
|
|
group_fullname | Fullname of group event is stored |
<xphp var="details_group_fullname" />
|
group_directory | Directory path of event’s group |
<xphp var="details_group_directory" />
|
tags_calendar | List of tags selected |
<xphp var="details_tags_calendar" />
|
gateway |
<xphp var="details_gateway" />
|
|
registration_open |
<xphp var="details_registration_open" />
|
|
last_editor | Name of user who last edited |
<xphp var="details_last_editor" />
|
rsvp_form | Displays RSVP form |
<xphp var="details_rsvp_form" />
|
images |
<xphp var="details_images" />
|
|
related_content | Related Content (galleries, web links, etc..) |
<xphp var="details_related_content" />
|
date_ts | Returns in the following format: 1416664800 |
<xphp var="details_date_ts" />
|
date_utc | Starting date/time (2014-11-22 14:00:00) |
<xphp var="details_date_utc" />
|
date_time | Time (12:00pm - 12:45pm) |
<xphp var="details_date_time" />
|
start_time | Start time (12:00pm) |
<xphp var="details_start_time" />
|
date | Date and Time (12:00pm - 12:45pm CST December 3) |
<xphp var="details_date" />
|
date2_time | End Time (12:45pm) |
<xphp var="details_date2_time" />
|
image_src | URL of uploaded image |
<xphp var="details_image_src" />
|
hero_image | Displays large version of upload image |
<xphp var="details_hero_image" />
|
thumbnail_href | URL of thumbnail |
<xphp var="details_thumbnail_href" />
|
thumbnail | Displays thumbnail |
<xphp var="details_thumbnail" />
|
ical | Displays “Download ical event” link |
<xphp var="details_ical" />
|
ical_link | URL to ical feed |
<xphp var="details_ical_link" />
|
timestamp | Start date in following format: 1416664800 |
<xphp var="details_timestamp" />
|
timestamp_end | End date in following format: 1416675600 |
<xphp var="details_timestamp_end" />
|
share | Returns true/false if shared to other groups |
<xphp var="details_share" />
|
cal_date |
Displays in stack format: Nov 22 |
<xphp var="details_cal_date" />
|
save_to_calendar | Displays “Add to Calendar” button |
<xphp var="details_save_to_calendar" />
|
canonical_url | The full canonical URL of the details page (LiveWhale 2.8.0+) |
<xphp var="details_canonical_url" />
|
Forms
Variable | Description | Code |
---|---|---|
title | Form Title |
<xphp var="details_title" />
|
last_modified | Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) |
<xphp var="details_last_modified" />
|
last_editor | Name of user who last edited |
<xphp var="details_last_editor" />
|
tags | List of tags selected |
<xphp var="details_tags" />
|
group_title | Title of group forms is stored in |
<xphp var="details_group_title" />
|
canonical_url | The full canonical URL of the details page (LiveWhale 2.8.0+) |
<xphp var="details_canonical_url" />
|
Galleries
Variable | Description | Code |
---|---|---|
id | Gallery ID |
<xphp var="details_id" />
|
title | Gallery Title |
<xphp var="details_title" />
|
date | Gallery Date entered in field (11/06/2014) |
<xphp var="details_date" />
|
description | Description |
<xphp var="details_description" />
|
image | Displays image |
<xphp var="details_image" />
|
thumbnails | Displays all thumbnail images |
<xphp var="details_thumbnails" />
|
thumbnail | Displays thumbnail |
<xphp var="details_thumbnail" />
|
thumbnail_href | URL to thumbnail |
<xphp var="details_thumbnail_href" />
|
location | Returns Title and address of location |
<xphp var="details_location" />
|
location_title | Location title |
<xphp var="details_location_title" />
|
location_latitude | Latitude coordinate of locations (ex., 41.40338) |
<xphp var="details_location_latitude" />
|
location_longitude | Longitude coordinate of locations (ex., 2.17403) |
<xphp var="details_location_longitude" />
|
galleryphotos |
<xphp var="details_galleryphotos" />
|
|
related_content | Related Content (galleries, web links, etc..) |
<xphp var="details_related_content" />
|
share | Returns true/false if shared to other groups |
<xphp var="details_share" />
|
gid | Numerical value of Group ID (ex., 4) |
<xphp var="details_gid" />
|
group_title | Name of group gallery is stored in |
<xphp var="details_group_title" />
|
group_directory | Directory path to group |
<xphp var="details_group_directory" />
|
status | Returns Hidden or Live status |
<xphp var="details_status" />
|
views | Number of views of gallery |
<xphp var="details_views" />
|
url | URL to gallery |
<xphp var="details_url" />
|
last_modified | Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) |
<xphp var="details_last_modified" />
|
has_comments | Returns true/false if comments exist |
<xphp var="details_has_comments" />
|
last_editor | Name of user who last edited |
<xphp var="details_last_editor" />
|
details_url |
<xphp var="details_details_url" />
|
|
tags | List of tags selected |
<xphp var="details_tags" />
|
canonical_url | The full canonical URL of the details page (LiveWhale 2.8.0+) |
<xphp var="details_canonical_url" />
|
News
Variable | Description | Code |
---|---|---|
id | News ID |
<xphp var="details_id" />
|
gid | Group ID |
<xphp var="details_gid" />
|
group_title | Group name |
<xphp var="details_group_title" />
|
group_directory | Directory path to group |
<xphp var="details_group_directory" />
|
headline | Headine |
<xphp var="details_headline" />
|
summary | Summary of the news story |
<xphp var="details_summary" />
|
date | News date (ex., May 17, 2017) |
<xphp var="details_date" />
|
date_dt | News datetime (ex., 2017-11-07 06:00:00) |
<xphp var="details_date_dt" />
|
body | News story body |
<xphp var="details_body" />
|
url | URL to the news story |
<xphp var="details_url" />
|
status | Hidden or Live news story |
<xphp var="details_status" />
|
views | Number of views of story received |
<xphp var="details_views" />
|
last_modified | Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) |
<xphp var="details_last_modified" />
|
has_comments | Returns true or false if comments exist |
<xphp var="details_has_comments" />
|
last_editor | Name of user who last edited the story |
<xphp var="details_last_editor" />
|
details_url |
<xphp var="details_details_url" />
|
|
tags | List of starred tags selected |
<xphp var="details_tags" />
|
location | Name and address of location |
<xphp var="details_location" />
|
location_title | Name of location |
<xphp var="details_location_title" />
|
location_longitude | Longitude coordinate of locations (ex., 2.17403) |
<xphp var="details_location_longitude" />
|
related_content | Related Content (galleries, web links, etc..) |
<xphp var="details_related_content" />
|
date | Story date entered in date field |
<xphp var="details_date" />
|
thumbnail | Displays thumbnail image |
<xphp var="details_thumbnail" />
|
thumbnail_href | URL to thumbnail image (available in 1.6) |
<xphp var="details_thumbnail_href" />
|
image | Displays the uploaded image |
<xphp var="details_image" />
|
contactinfo | Information entered in Contact Information field |
<xphp var="details_contactinfo" />
|
share | Returns true/false if shared to other groups |
<xphp var="details_share" />
|
views | Returns the number of views from Google Analytics (LW 1.5.1+) |
<xphp var="details_views" />
|
canonical_url | The full canonical URL of the details page (LiveWhale 2.8.0+) |
<xphp var="details_canonical_url" />
|
Profiles
Variable | Description | Code |
---|---|---|
id | Numerical profile id (ex., 7) |
<xphp var="details_id" />
|
gid | Numerical group id the profile is stored |
<xphp var="details_gid" />
|
tid | Numerical profile type id |
<xphp var="details_tid" />
|
group_title | Name of the group the profile is stored. (ex., Admissions) |
<xphp var="details_group_title" />
|
group_directory | URL path to the group (ex., http://localhost.edu/admissions) |
<xphp var="details_group_directory" />
|
parent |
<xphp var="details_parent" />
|
|
url | URL path to profile |
<xphp var="details_url" />
|
status | Hidden or Live |
<xphp var="details_status" />
|
firstname | First name (ex., “Jane”) |
<xphp var="details_firstname" />
|
middlename | Middle name (ex., “Ann”) |
<xphp var="details_middlename" />
|
lastname | last name (ex., “Smith”) |
<xphp var="details_firstname" />
|
title | Returns data entered in title field (ex., “Director of Marketing”) |
<xphp var="details_title" />
|
name | Full name is returned (“Jane Ann Smith”) |
<xphp var="details_name" />
|
style | Returns the profile style (ex., person) |
<xphp var="details_style" />
|
description | Returns data entered in Description field |
<xphp var="details_description" />
|
description_location |
<xphp var="details_description_location" />
|
|
last_modifed | Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) |
<xphp var="details_last_modified" />
|
contact_info | Returns data entered into the Contact Information field |
<xphp var="details_contact_info" />
|
contact_info_location |
<xphp var="details_contact_info_location" />
|
|
views | Number of profile views |
<xphp var="details_views" />
|
last_editor | Returns name of the person who last edited the profile. |
<xphp var="details_last_editor" />
|
details_url |
<xphp var="details_details_url" />
|
|
tags | List of tags are displayed |
<xphp var="details_tags" />
|
location_title | Location Title |
<xphp var="details_location_title" />
|
location_latitude | Latitude coordinate of locations (ex., 41.40338) |
<xphp var="details_location_latitiude" />
|
location_longitude | Longitude coordinate of locations (ex., 2.17403) |
<xphp var="details_location_longitude" />
|
type | Returns the profile type name (ex., Faculty) |
<xphp var="details_type" />
|
images | Returns a collection of profile’s images upload |
<xphp var="details_images" />
|
related_content | Related Content (galleries, web links, etc..) |
<xphp var="details_related_content" />
|
thumbnail_href | URL to the image thumbnail |
<xphp var="details_thumbnail_href" />
|
thumbnail | Displays the thumbnail image |
<xphp var="details_thumbnail" />
|
image | Displays the uploaded image |
<xphp var="details_image" />
|
body | Returns all data entered and set as “body” in profile type |
<xphp var="details_body" />
|
sidebar | Returns all data entered and set as “sidebar” in profile type |
<xphp var="details_sidebar" />
|
share | Returns true/false if shared to other groups |
<xphp var="details_share" />
|
canonical_url | The full canonical URL of the details page (LiveWhale 2.8.0+) |
<xphp var="details_canonical_url" />
|
Blurbs
Variable | Description | Code |
---|---|---|
id | Numerical blurb id (ex., 7) |
<xphp var="details_id" />
|
gid | Numerical group id the blurb is stored |
<xphp var="details_gid" />
|
tid | Numerical blurb type id |
<xphp var="details_tid" />
|
group_title | Name of the group the blurb is stored. (ex., Admissions) |
<xphp var="details_group_title" />
|
status | Hidden or Live |
<xphp var="details_status" />
|
title | Returns data entered in title field |
<xphp var="details_title" />
|
body | Returns data entered in body field |
<xphp var="details_body" />
|
last_modifed | Timestamp of last edit (ex., “Nov. 7th at 2:22pm”) |
<xphp var="details_last_modified" />
|
last_editor | Returns name of the person who last edited the blurb. |
<xphp var="details_last_editor" />
|
tags | List of tags are displayed |
<xphp var="details_tags" />
|
canonical_url | The full canonical URL of the details page (LiveWhale 2.8.0+) |
<xphp var="details_canonical_url" />
|