Adding tree structure for pages