Using multiple applications from single atk directory
From Achievo/ATK Wiki
|
ATK Howto: Using multiple applications from single atk directory
|
The following procedure is used where multiple ATK applications are on the same domain. For multiple domains, use symbolic links (*NIX) or junctions (Windows), which is not covered here.
To make multiple atk applications share a common atk directory, there are a couple of steps to take:
- Remove the line $config_atkroot="/." in the files: app.php, top.php, index.php, welcome.php, menu.php etc. These files include atk.inc, and the $config_atkroot will be set there.
- Edit atk.inc:
- Add a $config_application_dir="./"; before include_once(...)
- Change $config_atkroot="../common_code/"
This path must be relative to config_approot, and must be readable by your webserver and the users browser.
Traditional Procedure
For ATK versions before 6.2.0, use the following procedure: The following procedure is tested on atk 5.6.0 and is used where multiple atk applications are on the same domain. For multiple domains, use symbolic links (*NIX) or junctions (Windows), which is not covered here.
To make multiple atk applications share a common atk directory, there are a couple of steps to take:
- Remove the line $config_atkroot="/." in the files: app.php, top.php, index.php, welcome.php, menu.php etc. These files include atk.inc, and the $config_atkroot will be set there.
- Edit atk.inc:
- Add a $config_approot="./"; before include_once(...)
- Change $config_atkroot="../common_code/"
This path must be relative to config_approot, and must be readable by your webserver and the users browser.
- Edit Initial.inc (in atk/include dir) (also edit when updating to a new version of atk):
- Change $config_atkroot to $config_approot in include_once($config_atkroot."config.inc.php");
- Move same line (include_once($config_approot."config.inc.php")) before '// Auto-register modules' so it read your app modules from the right place
- Edit config.inc.php:
Make sure a $config_module_path = $config_appdir."modules/"; is present - Default you use a atktmp dir in your $config_atkroot dir.
If your want temp files in your app path add the following to your config.inc.php:
$config_atktempdir = $config_approot."atktmp/"; $config_tplroot = $config_approot; $config_tplcompiledir = $config_atktempdir."compiled/tpl/"; $config_tplcachedir = $config_atktempdir."tplcache/";