Implements a pagetree implementation for automatic menu generation