예제 #1
0
    /// <Summary>
    /// Gets an enumeration object that represents all the child nodes of the current hierarchical node.
    /// </Summary>
    public virtual IHierarchicalEnumerable GetChildren()
    {
        NavDataPageHierarchicalEnumerable objNodes = new NavDataPageHierarchicalEnumerable();

        if (m_objNode != null)
        {
            DNNNode objNode;
            foreach (DNNNode tempLoopVar_objNode in m_objNode.DNNNodes)
            {
                objNode = tempLoopVar_objNode;
                objNodes.Add(new NavDataPageHierarchyData(objNode));
            }
        }
        return(objNodes);
    }
예제 #2
0
    /// <Summary>
    /// Starting with the rootNode, recursively build a list of
    /// PageInfo nodes, create PageHierarchyData
    /// objects, add them all to the PageHierarchicalEnumerable, and return the list.
    /// </Summary>
    public override IHierarchicalEnumerable Select()
    {
        NavDataPageHierarchicalEnumerable objPages = new NavDataPageHierarchicalEnumerable();

        DNNNodeCollection objNodes;
        DNNNode objNode;
        objNodes = DotNetNuke.UI.Navigation.GetNavigationNodes(m_sNamespace);
        // HACK : Modified to not error if object is null.
        //if (m_sKey.Length > 0)
        if (!string.IsNullOrEmpty(m_sKey))
        {
            objNodes = objNodes.FindNodeByKey(m_sKey).DNNNodes;
        }
        foreach (DNNNode tempLoopVar_objNode in objNodes)
        {
            objNode = tempLoopVar_objNode;
            objPages.Add(new NavDataPageHierarchyData(objNode));
        }
        return objPages;
    }
예제 #3
0
    /// <Summary>
    /// Starting with the rootNode, recursively build a list of
    /// PageInfo nodes, create PageHierarchyData
    /// objects, add them all to the PageHierarchicalEnumerable, and return the list.
    /// </Summary>
    public override IHierarchicalEnumerable Select()
    {
        NavDataPageHierarchicalEnumerable objPages = new NavDataPageHierarchicalEnumerable();

        DNNNodeCollection objNodes;
        DNNNode           objNode;

        objNodes = DotNetNuke.UI.Navigation.GetNavigationNodes(m_sNamespace);
        // HACK : Modified to not error if object is null.
        //if (m_sKey.Length > 0)
        if (!string.IsNullOrEmpty(m_sKey))
        {
            objNodes = objNodes.FindNodeByKey(m_sKey).DNNNodes;
        }
        foreach (DNNNode tempLoopVar_objNode in objNodes)
        {
            objNode = tempLoopVar_objNode;
            objPages.Add(new NavDataPageHierarchyData(objNode));
        }
        return(objPages);
    }
    /// <Summary>
    /// Gets an enumeration object that represents all the child nodes of the current hierarchical node.
    /// </Summary>
    public virtual IHierarchicalEnumerable GetChildren()
    {
        NavDataPageHierarchicalEnumerable objNodes = new NavDataPageHierarchicalEnumerable();

        if (m_objNode != null)
        {
            DNNNode objNode;
            foreach (DNNNode tempLoopVar_objNode in m_objNode.DNNNodes)
            {
                objNode = tempLoopVar_objNode;
                objNodes.Add(new NavDataPageHierarchyData(objNode));
            }
        }
        return objNodes;
    }