there are php commands to get the directory you are curently in and to get the file name (it might be the same command i cant remember) but it will give you
http://www.mysite.com/index.html
so you will need to do some string minipulation to split it by / symbol then for each folder say its called gallery you could tkae the 3rd element in the array and get gallery then add the > symbol then the page name. Its a lot of work and would be eaiser to hard code it but i supose it depends how many pages it has