1
我想展示一些網站頁面的URL在Liferay jsp portlet。我正在使用Liferay 6.1 EE。我想使用頁面的本地化標題和其他自定義字段(例如cssClass)。如何在Liferay jsp portlet中顯示網站頁面url?
我已經做導航欄一樣,我速度主題:
#if (!$page_group.isUser())
#set($layoutLocalService = $serviceLocator.findService("com.liferay.portal.service.LayoutLocalService"))
<ul id="quickLinks">
<li>
#set($currFriendlyUrl = "/i-want-to")
#set($currLayout = $layoutLocalService.getFriendlyURLLayout($group_id, true, $currFriendlyUrl))
<a href="$currLayout.getRegularURL($request)" $currLayout.getTarget() class="$currLayout.getExpandoBridge().getAttribute('cssClass')">$currLayout.getName($locale)</a>
</li>
</ul>
#end
我怎麼能寫JSP使用相同的代碼?
我找到了similar quesion,但在答案中沒有明確的jsp代碼示例。