About 80% of all variables and constants applicable for the usage in the frontend are defined in the files config.php, framework/class.wb und framework/class.frontend.php. The most important ones are described consecutively. 

Important variables and constants

The most important variables and constants applicable in index.php file of templates are summarised below.

Constants (config.php) Description:
WB_PATH Path to the WB root directory (location of config.php)
WB_URL URL to the WB root directory
ADMIN_PATH Path to the admin login
ADMIN_URL URL to the admin login
WBMAILER_SMTP_HOST to enable SMTP for outgoing mails
DB_TYPE database type (mysql)
DB_HOST database host (e.g. localhost)
DB_USERNAME database username (e.g. root)
DB_PASSWORD database password
DB_NAME database name
TABLE_PREFIX string added at the beginning of DB table names
Constants (class.frontend.php) Description:
PAGE_TITLE title of current displayed page
MENU_TITLE caption of current displayed menue
PARENT PAGE_ID of the parent page, default 0
LEVEL menue level of actual displayed menu
VISIBILITY visibility of actual page (private, registered, none, hidden)
PAGE_DESCRIPTION page description of actual page
TEMPLATE template name of current displayed page
DEFAULT_TEMPLATE template name of default template
TEMPLATE_DIR template directory of current displayed page
THEME_URL template directory of current displayed backendpage
SEARCH visibility of search form (public, private, registered, none)
LOGIN_URL URL of the login page
LOGOUT_URL URL of the logout page
FORGOT_URL URL to show forgotten page
PREFERENCES_URL URL to change user preferences (Backend)
SIGNUP_URL URL to registration page
Other Constants Description:
PAGE_ID page identification number of current displayed page
PAGE_EXTENSION page extension of current displayed page (e.g. .php)
PAGES_DIRECTORY pages directory of current displayed page(e.g. pages)
MEDIA_DIRECTORY name of the media directory (e.g. media)
LANGUAGE language of current displayed page (e.g. EN, DE)
DEFAULT_LANGUAGE default language (e.g. EN)
Session variables (class.wb.php) Description:
$_SESSION['USER_ID'] ID of the user loged in
$_SESSION['GROUP_ID'] group ID of the user loged in
$_SESSION['GROUP_NAME'] group name of the user loged in
$_SESSION['USERNAME'] user name of the user loged in
$_SESSION['DISPLAY_NAME'] display name of the user loged in
$_SESSION['HOME_FOLDER'] home folder in /media of user loged in
$_SESSION['TIMEZONE'] timezone of user loged in

 Table of the most important variables


Display all variables and constants

You can display all defined variables, constants and functions by the use of some default PHP functions. Simply add a page or section of type code and add the following PHP function calls. Note that the list contains all variables, constants and functions defined in the current context; not only WebsiteBaker ones. However, this is a good starting point for further investigation.

Display all defined constants: more infos...


Display all defined variables: more Infos...


Display all defined functions: more Infos...



By the use of the PHP buffer and array functions, one could seperate the variables, constants and functions defined by WebsiteBaker from the external ones. If there are any volunteeers out there in the WB forum, feel free to code a simple module or script and post it here.