<ul class="nav nav-list">
<#list permission as perm>
<li>
<a id="" href="#" target="_blank" rel="external nofollow" 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}" target="_blank" rel="external nofollow" 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指令周遊這個對象,動态加載菜單欄。