Rather than recursively querying the DB on each Page to figure out the proper path, I decided to pre-build a list of all pages, along with their slugs/names and their parent IDs.