Using multiple applications from single atk directory
{{howto|Easy|[[Olav B. Lygre]] <soppel@lygre.no>}} 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:
1) Remove all references to $config_atkroot in app.php, top.php, index.php, welcome.php, menu.php etc. These files include atk.inc, and the $config_atkroot will be set there.
2) Edit atk.inc:
1) Add a $config_approot="./"; before include_once(...)
2) Change $config_atkroot="../common_code/"
This path must be relative to config_approot, must be readable by your webserver and browser
3) Edit Initial.inc (in atk/include dir) (also edit when updating to a new version of atk)
1) Change $config_atkroot to $config_approot in include_once($config_atkroot."config.inc.php"); 2) Move same line (include_once($config_approot."config.inc.php")) before // Auto-register modules
so it read your app modules from the right place
4) Edit config.inc.php
Make sure a $config_module_path = $config_appdir."modules/"; is present
5) 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/";