Added toggle php and html modes function and cake2 support