implement navigation tree and reflect navigation on cookie