Answer the question
In order to leave comments, you need to log in
MODX, path hardcoding - why?
Why are absolute paths hardcoded in MODX-e during installation? Why couldn't the definition of the root be moved somewhere in a shared file and use $_SERVER['DOCUMENT_ROOT'] by default - a variable that is defined in 99.(9)% of cases? And who does not have it, or who still wants to hardcode it, could change it in one place, and not in 4 files 9 times.
Answer the question
In order to leave comments, you need to log in
For the developers of MODx were not smart enough to create an independent constantdefine('ROOT_PATH', dirname(__FILE__));
I don't see any problem at all. The only problem is when moving the site. You have to change the configs in the root, manager, connectors. But otherwise the hard way is the opposite good. I often have to make modules with the system API and it is easier to connect them with hard routes. Try to go back to EVO and see what kind of jamb there was with routes. Each module was referenced in its own way. But now it's fun to watch.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question