def __init__(self, tree, view, with_root=False):
        self.tree = json.loads(tree.to_json(with_data=True))
        self.view = view
        self.with_root = with_root # For public sitemap

        # Public sitemap
        self.sitemap = self.get_public_sitemap(self.tree)

        # Store a flat list of every ressources to build as pages
        self.ressources = self.recursive_ressources([self.tree])