This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Get the requested URL alias and explode into array | |
| $q = trim($_SERVER['REQUEST_URI'], '/'); | |
| $arg = explode('/', $q); | |
| // Shorten the URL by 1 argument | |
| $newArg = array_slice($arg, 0, (count($arg) - 1)); | |
| // Get the menu item for the new URL |
NewerOlder