Question

I have a sitemap generator controller which generates the sitemap.xml when url,lastmod,priority values are given. But how can i get the all urls on my site dynamically? Site is built using CI.

Please Help?

Was it helpful?

Solution

You can use the reflection class to get feedback about your public controllers. Loop your controller directory and grab the names of each file.

OTHER TIPS

If you are using the framework correctly you should be able to grep for "public function" in your controllers directory to get a list of all pages which would translate to a URL

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top