• Language
Get it!
Get started with WholeSite today!
The Latest
WholeSite™ Framework for PHP : Variables

Throughout the Framework there are defined variables that are accessible from any of your template pages.

WholeSiteConfig · Class
This Class resides in WholeSiteConfig.php at the root of the website. It contains a set of defined constants.
Name Type Default Description
LICENSE string Unique license key issued by WholeSite for your website.
SITE string Unique UUID created within WholeSite for this site.
WHOLESITE_ENDPOINT string www.xmanager.ca URL for the WholeSite WebService.
ACTIVE_PAGE_CATEGORIES string list the categories that contain the active pages for the site (separate multiple with a '|') ('840|654')
DEFAULT_TEMPLATE string home Set the name of the Default template to use if no other template is set.
CACHE_SERVICES bool false [true|false] Cache Web Services (Minimum for Production)
CACHE_RENDERED bool false [true|false] Cache the rendered pages before processed by PHP (Minimum for Production)
CACHE_COMPILED bool false true|false - Cache the compiled output of PHP (Best performance)
CACHE_TIME bool 30 Length of time in minutes to cache objects for.
CACHE_PATH string _cache/ Path from root where cache files are stored. This folder must have permissions to be written to by the apache process.
WHOLESITE_ROOT string WholeSite/ Path from the root where the WholeSite library resides.
CONTENT_PATH string _content/ Path from the root where the 'web' root is.
CONTROL_PATH string _content/controls/ Path from the root where the 'user controls' reside. (<WSUserControl::[filename] />)
DEBUG bool false [true|false] Set this on or off to display additional debug information.
OFFLINE_SAMPLE_DATA bool false [true|false] Use this for playing/testing with the framework
	echo WholeSiteConfig::DEFAULT_TEMPLATE;
	if(WholeSiteConfig::DEFAULT_TEMPLATE == "home") {
		echo "It's the same!";
$WS · WholeSiteSystem Object
This is the WholeSiteSystem Object. It holds the key to everything. Use this to access almost any Object or value within the Framework.
Properties ( These Properties are functions that have __get, __set functionality. )
Name Type Default Description
WSTemplateName string WholeSiteConfig DEFAULT_TEMPLATE The name or path of the physical template file to use for the current URL, excluding the file extension. ('home', 'folder/home')
WSTemplateType string default [default|custom]
WSUrlParser WholeSiteUrlParser Tools for manipulating and retrieving the URL.
WSContentClient WholeSiteContentService The Content Web Service Object.
WSUserClient WholeSiteUserService The User Web Service Object.
WSSearchClient WholeSiteSearchService The Search Web Service Object.
WSCommunityService WholeSiteCommunityService The Community Web Service Object.
User WholeSiteUser The currently logged in User Object.
Site WholeSiteSite The Site data is requested from the WholeSite Cloud CMS based upon the Site ID in the WholeSiteConfig.php file.
Content WholeSiteContent Content is requested from the WholeSite Cloud CMS if there is a UUID in the URL. ('/mypage/[36 Character ID]/Title of Content/index.html')
Page WholeSitePage The Page is requested from the WholeSite Cloud CMS through the Web Services, based upon the friendly url of the current page.
Query array QueryString parameters (__q/key/value/key/value/n...) $value = $WS->Query[key];
Context WholeSiteContext Use the Context object to pass parameters to objects that do not have normal access to your variables.
BreadCrumbTrail string HTML output of the current page '<li>' list based on the requested path
SiteTimer WholeSiteTimer Timer for the site load time
UserTicket WholeSiteUserTicket The authentication ticket passed back from the WholeSite System for the current User.
Name Parameters Return Description
RenderSite() void Starts the Template Engine. You'll find this call in index.php at the root.
	// will display the current pages title
	echo $WS->Page->Title; 
	// These will normally be set in WholeSiteUserCode.php
	$WS->WSTemplateName = "myCustomTemplate";
	$WS->WSTemplateType = "custom";
	// This will display the time the site has taken to render up until the point of the call
	echo $WS->SiteTimer->Stop();
<ul class="clean bct"><?=$WS->BreadCrumbTrail("", "»", false) ?></ul>
© Mtex Media Corporation 2007-2017. All rights reserved. WholeSite™