private RenderingFolder GetRenderingsDeep(string rootPath)
        {
            var metaItemMapper = new RenderingMetaItemMapper(new HttpRequestWrapper(HttpContext.Current.Request));
            var fldrMapper = new RenderingFolderMapper();

            // get root item - go deeper if are sub items
            // otherwise, assume empty folder or bad path
            Item root = this.Database.GetItem(rootPath);
            RenderingFolder result = fldrMapper.Map(root);

            if (root.HasChildren)
            {
                // grab folders, add, traverse deeper
                var fldrs = root
                    .Axes
                    .GetDescendants()
                    .Where(x => this.FolderTemplates.Contains(x.TemplateID))
                    .Select(x => fldrMapper.Map(x))
                    .ToList();

                foreach (var f in fldrs)
                {
                    result.Folders.Add(this.GetRenderingsDeep(f.Path));
                }

                // grab renderings, add only
                var renderings = root
                    .Children
                    .Where(x => !this.FolderTemplates.Contains(x.TemplateID))
                    .Select(x => metaItemMapper.Map(x))
                    .ToList();

                foreach (var r in renderings)
                {
                    result.Renderings.Add(r);
                }
            }

            return result;
        }
        private RenderingFolder GetRenderingsDeep(string rootPath)
        {
            var metaItemMapper = new RenderingMetaItemMapper(new HttpRequestWrapper(HttpContext.Current.Request));
            var fldrMapper     = new RenderingFolderMapper();

            // get root item - go deeper if are sub items
            // otherwise, assume empty folder or bad path
            Item            root   = this.Database.GetItem(rootPath);
            RenderingFolder result = fldrMapper.Map(root);

            if (root.HasChildren)
            {
                // grab folders, add, traverse deeper
                var fldrs = root
                            .Axes
                            .GetDescendants()
                            .Where(x => this.FolderTemplates.Contains(x.TemplateID))
                            .Select(x => fldrMapper.Map(x))
                            .ToList();

                foreach (var f in fldrs)
                {
                    result.Folders.Add(this.GetRenderingsDeep(f.Path));
                }

                // grab renderings, add only
                var renderings = root
                                 .Children
                                 .Where(x => !this.FolderTemplates.Contains(x.TemplateID))
                                 .Select(x => metaItemMapper.Map(x))
                                 .ToList();

                foreach (var r in renderings)
                {
                    result.Renderings.Add(r);
                }
            }

            return(result);
        }