Dynamic Menu / Title / Breadcrumb Trail Generator
This code reads the names of all folders in a directory and generates a menu of links to those directories. If there are no directories, it checks the next folder down and uses those instead. It also generates a breadcrumb trail and page titles based on the url of the page. For more advanced instructions, click the link provided to my site.