Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Path Aliases (pathReplaces.php)
Clone this wiki locally
vQmod lets you use aliases to substitute the more commonly know path with your own renamed path. The most widely used example of this is when you rename your opencart
admin directory to something else. Since all the xml scripts reference the
admin/ path, this can cause your scripts to fail if you don't change this in each xml manually.
So VQMod has a file called
pathReplaces.php, located in the
/vqmod directory. You can edit this file and create an alias for a path, such as changing your
admin directory to
backend or whatever your admin is renamed to. There is an example at the top of that file on how to add it. This prevents you from having to manually edit all your xml files to change the path.
Here is an example that redirects the
admin directory to a
// START REPLACES // $replaces = array('~^admin\b~', 'backend'); // This replaces the admin directory name to backend in all VQMod xmls automatically // END REPLACES //
These are regular expression (regex) replaces so be sure you keep the additional characters like
^ as those are important for proper name matching.
Available as of version 2.3.0