深入浅出Liferay Portal (8)

tiles-def.xml
------------------
<definition name="portal" path="/common/themes/portal.jsp">
  <put name="title" value="" />
  <put name="selectable" value="false" />
</definition>

portal.jsp
--------------
<c:choose>
 <c:when test="<%= themeDisplay.isStateExclusive() %>">
  <%= request.getAttribute(WebKeys.LAYOUT_CONTENT) %>
 </c:when>
 <c:when test="<%= themeDisplay.isStatePopUp() %>">
  <liferay-theme:include page="portal_pop_up.jsp" />
 </c:when>
 <c:otherwise>
  <liferay-theme:include page="portal_normal.jsp" />
 </c:otherwise>
</c:choose>

portal_normal.vm
--------------------------
<html dir="#language ("lang.dir")">

$theme.include($top_head_include)

#css ($css_main_file)
#js ($js_main_file)
$theme.include($bottom_ext_include)
$theme.include($session_timeout_include)
$theme.include($sound_alerts_include)


init.vm
---------
#set ($bottom_ext_include = "$dir_include/common/themes/bottom.jsp")
#set ($content_include = "$dir_include$tilesContent")
#set ($session_timeout_include = "$dir_include/common/themes/session_timeout.jsp")
#set ($sound_alerts_include = "$dir_include/common/themes/sound_alerts.jsp")
#set ($top_head_include = "$dir_include/common/themes/top_head.jsp")
#set ($top_messages_include = "$dir_include/common/themes/top_messages.jsp")

top_head.jsp
------------------
<%@ include file="/html/common/themes/top_js.jspf" %>
<%@ include file="/html/common/themes/top_js-ext.jsp" %>


top_js.jspf
------------
<%
String[] javaScriptFiles = PropsUtil.getArray(PropsUtil.JAVASCRIPT_FILES);
for (int i = 0; i < javaScriptFiles.length; i++) {
%>
  <script src="<%= themeDisplay.getPathJavaScript() %>/<%= javaScriptFiles[i] %>"  type="text/javascript"></script>
<%
}
%>


portal.properties
-------------------
##
## JavaScript
##

    #
    # Set a list of JavaScript files that will be loaded programmatically in
    # /html/common/themes/top_js.jsp.
    #
    # The ordering of the JavaScript files is important. Specifically, all
    # JQuery scripts should go first.
    #
    # The Liferay scripts are grouped in such a way, that the first grouping
    # denotes utility scripts that are used by the second and third groups. The
    # second grouping denotes utility classes that rely on the first group, but
    # does not rely on the second or third group. The third grouping denotes
    # modules that rely on the first and second group.
    #
    javascript.files=/
        /
        #
        # JQuery scripts
        #
        /
        jquery/jquery.js,/
        jquery/cookie.js,/
        jquery/dimensions.js,/
        jquery/hover_intent.js,/
        jquery/interface.js,/
        jquery/interface.patch.js,/
        jquery/j2browse.js,/
        jquery/jeditable.js,/
        jquery/json.js,/
        jquery/media.js,/
        jquery/tabs.js,/
        /
        #
        # Miscellaneous scripts
        #
        /
        misc/class.js,/
        misc/swfobject.js,/
        /
        #
        # Liferay base utility scripts
        #
        /
        liferay/liferay.js,/
        liferay/browser.js,/
        liferay/util.js,/
        liferay/language.js,/
        liferay/layout.js,/
        /
        #
        # Liferay utility scripts
        #
        /
        liferay/ajax.js,/
        liferay/animate.js,/
        liferay/coordinates.js,/
        liferay/ldrag.js,/
        #liferay/leditable.js,/
        liferay/lresize.js,/
        liferay/popup.js,/
        liferay/portal.js,/
        liferay/portlet.js,/
        liferay/publisher.js,/
        /
        #
        # Liferay modules
        #
        /
        liferay/auto_fields.js,/
        liferay/color_picker.js,/
        liferay/columns.js,/
        liferay/dock.js,/
        liferay/dynamic_select.js,/
        liferay/freeform.js,/
        liferay/layout_configuration.js,/
        liferay/messaging.js,/
        liferay/notice.js,/
        liferay/navigation.js,/
        liferay/session.js,/
        liferay/tags_selector.js 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值