In the app I’m building there is a side menu with links to the different pages. The menu is dependant on the logged in user, so it’s dynamically loaded from a database. Now the problem is that not all pages in the list coming from the database are implemented, so I need to exclude those from a list. At the present moment I’m using a simple array which has all my implemented pages.
I was wondering if there is a way to check all the files in the ‘pages’ folder and filter the list coming from the database using that. What I need is to get a list of all pages in the folder, also it would be nice if I could also get the module names of each page, because I need it afterwards for navigation.