<ul class="nav nav-list">
<#list permission as perm>
<li>
<a id="" href="#" class="dropdown-toggle tooltip-success" data-rel="tooltip"
data-placement="right" title="${perm.menuName}">
<i class="${perm.icon}"></i>
<span class="menu-text">${perm.menuName} </span>
</a>
<b class="arrow"></b>
<ul class="submenu">
<#if perm.childrens??>
<#list perm.childrens as child>
<li id="${child.no}" class="">
<a href="${child.menuUrl}" class="tooltip-success" data-rel="tooltip"
data-placement="right" title="${child.menuName}">
<i class="${child.icon}"></i>
<span>${child.menuName}</span>
</a>
<b class="arrow"></b>
</li>
</#list>
</#if>
</ul>
</li>
</#list>
</ul><!-- /.nav-list -->
上面的代码为集成cas单点登录后在session中获取permission对象,利用freemarker指令遍历这个对象,动态加载菜单栏。