page/client/page/pageServices.js
function (path) {
            var hierachy = scope.tree.pathToIdArray(path);

            var pages = [];
            var subtree = scope.tree.all;

            for (var h in hierachy) {
                var id = hierachy[ h ];
                if (scope.tree.hasChildren(subtree) && subtree.children[ id ]) {
                    subtree = subtree.children[ id ];
                    pages.push(subtree);
                } else if (subtree && subtree[ id ]) {
                    // extract root node, which is no child, directly
                    subtree = subtree[ id ]
                    pages.push(subtree);
                }
            } 
            return pages;
        }
function (path) {
            var hierachy = scope.tree.pathToIdArray(path);

            var pages = [];
            var subtree = scope.tree.all;

            for (var h in hierachy) {
                var id = hierachy[ h ];
                if (scope.tree.hasChildren(subtree) && subtree.children[ id ]) {
                    subtree = subtree.children[ id ];
                    pages.push(subtree);
                } else if (subtree && subtree[ id ]) {
                    // extract root node, which is no child, directly
                    subtree = subtree[ id ]
                    pages.push(subtree);
                }
            } 
            return pages;
        }
Convert path to array of page objects *