mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
updated router.php to automatically determine relative path based off directory depth and use var path_prefix instead of prepend_uri var these vars are only used in header and footer php files for now
This commit is contained in:
@@ -4,8 +4,5 @@
|
||||
// Currently unused, but the idea is to dynamically prepend ../../ to asset paths (like includes, libraries, etc.)
|
||||
// based on the current directory depth. This allows us to support deeply nested folder structures.
|
||||
|
||||
if ($_SERVER['REQUEST_URI'] === '/user/reports') {
|
||||
$prepend_uri = "../";
|
||||
} else {
|
||||
$prepend_uri = '';
|
||||
}
|
||||
$depth = substr_count(trim($_SERVER['REQUEST_URI'], '/'), '/');
|
||||
$path_prefix = str_repeat('../', $depth);
|
||||
|
||||
Reference in New Issue
Block a user