FUEL Constants
In addition to the CodeIgniter constants, FUEL CMS provides the following:
- FUEL_VERSION: The current version number of FUEL
- FUEL_FOLDER: The FUEL module folder name. The value is fuel
- FUEL_PATH: The full server path to the FUEL module folder
- FUEL_ROUTE: The route to use to access the FUEL CMS. The default value is fuel/
- USE_FUEL_ROUTES: A boolean value automatically generated based on the URI location which determines whether to includes the FUEL routes in a request or not
- FUEL_ADMIN: This is only set in a controller that extends the Fuel_base_controller and can be used to assess if the current page is an admin page or not.
- MODULES_FOLDER: The folder path relative to the fuel/application directory. The value is '../modules'
- MODULES_PATH: The full server path the module folder
- MODULES_FROM_APPCONTROLLERS: The modules folder relative to the application controllers directory
- MODULES_WEB_PATH: The web path to the modules folder
- WEB_FOLDER: The name of the web folder of the FUEL installation
- WEB_ROOT: The full server path to the web directory
- WEB_PATH: The web path to the FUEL installation on the server (if fuel is installed in a subfolder)
- BASE_URL: The web path in which all site urls are based. Is also used as the $config['base_url'] value in the fuel/application/config/config.php file
Constants for Advanced Modules
When creating an advanced module, you should also create a constants file at /fuel/modules/{module}/config/{module}_constants.php with at least the following constants:
define('{MY_MODULE}_VERSION', '1.0'); define('{MY_MODULE}_FOLDER', 'my_module'); define('{MY_MODULE}_PATH', MODULES_PATH.{MY_MODULE}_FOLDER.'/');