If you need an automated way to figure out the installation path and directory to the Soholaunch install, you can use this function. The function relies on the use of my currentPage function for some string manipulation. It’s especially helpful for coding menus into your template as the file directory can jump when a user goes to the shopping cart.
<?php
function pathToInstall() {
return str_replace(str_replace(" ","_",currentPage()).".php","",$_SERVER['REQUEST_URI']);
}
?>
Pretty simple, but can be very helpful on getting your links straight.
Click here to download the code (includes a copy of the currentPage function).
