IList<NodeInfo> GetAllChildNodes(int intParentID[/string strParentIdentifier])

定义和用法

获取指定栏目的所有下级栏目(包括多层下级)

语法

${cms.GetAllChildNodes(int intParentID[/string strParentIdentifier])}
参数 描述
int intParentID[/string strParentIdentifier] 指定的栏目ID或者栏目标识

返回值

返回指定栏目的所有下级栏目。

提示和注释

intParentID为0时,表示是顶级栏目,${cms.GetAllChildNodes(0)} 表示获取所有下级栏目

例子

        #foreach($item in ${cms.GetAllChildNodes(20)})
            ${item.NodeName}<br />
        #end
        

输出:

        博客文章
        服务
        友情链接
        .Net
        项目案例
        JQuery
        SQL
        联系
        技术以外
        我的博客