02-24-2016, 04:58 PM
I think the quick way to do that would be to add this function to the us_helpers.php file
function getMoreFiles($location) {
$directory = "../$location";
$pages = glob($directory . "*.php");
foreach ($pages as $page){
$fixed = str_replace('../$location','',$page);
$row[$fixed] = $fixed;
}
return $row;
}
Then on your admin_pages file you would do something like...
$newFolder="myfolder"; //no beginning slash needed
then below that you would call...
$extraPages = getMoreFiles($newFolder);
Then it's just a matter of adding that $extraPages to the array.
$pages = array_merge($rootpages, $uspages,$extrapages);
I haven't tested it, but that makes sense off the top of my head.
function getMoreFiles($location) {
$directory = "../$location";
$pages = glob($directory . "*.php");
foreach ($pages as $page){
$fixed = str_replace('../$location','',$page);
$row[$fixed] = $fixed;
}
return $row;
}
Then on your admin_pages file you would do something like...
$newFolder="myfolder"; //no beginning slash needed
then below that you would call...
$extraPages = getMoreFiles($newFolder);
Then it's just a matter of adding that $extraPages to the array.
$pages = array_merge($rootpages, $uspages,$extrapages);
I haven't tested it, but that makes sense off the top of my head.