Configuration
ImpressPages configuration values can be changed in system configuration file config.php (e.g., if you want to change development environment constants) or using administration pages (e.g. if you want to change a current theme). Use ipConfig() function to access ImpressPages configuration values.
Get configuration value
<?php echo ipConfig()->get('timezone'); // Gets 'timezone' configuration value
See the list of available configuration values below.
Available configuration values
Key | Value | Purpose |
adminLocale | string | Language code for administration pages. |
baseDir | string | Absolute path to the website root is generated by ImpressPages automatically. Set this configuration value if automatic setting does not work. |
charset | string | HTML charset |
db | array | Database connection settings (see "Database connection settings" table below). |
debugMode | boolean | Debug mode loads raw unminified JS files, alerts AJAX errors. |
defaultDoctype | string | HTML doctype. Default value 'DOCTYPE_HTML5' |
developmentEnvironment | boolean | Displays error and debug information. Change to 0 before deploying to production server. |
disableHttpOnlySetting | boolean |
ImpressPages sets PHP session.cookie_httponly setting to true by default. Use this setting to disable this behaviour. |
fileOverrides | array |
Allows to override directories for ImpressPages files: 'fileOverrides' => array( |
rewritesDisabled | boolean | Set to true if mod_rewrite is disabled. |
sessionName | string | Prevents session conflict when two sites runs on the same server. |
showErrors | boolean | Set to 0 if you don't wish to display errors on the page. |
theme | string |
Current theme name. |
timezone | string | PHP 5 requires timezone to be set. E.g. 'UTC' |
urlOverrides | array |
Allows to specify different URLs for ImpressPages files: 'urlOverrides' => array( 'Ip/' => 'http://example.com/xxx/', ) |
Database connection settings
Key | Meaning |
hostname | Database host name or IP address |
username | Database username |
password | Database user's password |
tablePrefix | Table prefix for ImpressPages tables |
database | Database name |
charset | Charset |
driver (since 4.2.1) |
Database engine driver. Two drivers available: 'mysql' or 'sqlite'. Default is 'mysql'.
some plugins may not support SQLite |
Get a current theme name
<?php echo ipConfig()->theme();
The code above outputs a name of current website's theme.
Check if a site is running in development environment
<?php if (ipConfig()->isDevelopmentEnvironment()){ var_dump(ipRequest()->getPost()); } ?>
The example above checks if the site is running in development environment and shows HTTP request dump.
To switch a website to development environment mode, set developmentEnvironment constant value to 1 in config.php file.
Check if a site is running in debug mode
<?php if (ipConfig()->isDebugMode()){ var_dump(ipRequest()->getPost()); } ?>
Website title & email
ImpressPages provides a global setting to store website's title and email. Both values can be set in Config section of admin. This is how you can get these values in PHP
<?php $websiteTitle = ipGetOptionLang('Config.websiteTitle'); $websiteEmail = ipGetOptionLang('Config.websiteEmail');
You can set different values for each language. The function returns correct value depending on the language of currently rendered page. Pass language code as a second parameter to get specific language value
<?php $websiteTitle = ipGetOptionLang('Config.websiteTitle', 'en'); $websiteEmail = ipGetOptionLang('Config.websiteEmail', 'en');