<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 12, comments - 19, trackbacks - 0, articles - 23
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理
    ?Liferay Portal 4.0 為我們提供了幾種不同的頁面布局,我們可以通過Add Content中的Template參數來指定不同的頁面布局,但是,但我們利用CMS來定制文章內容的時候,僅有的幾種頁面布局并不能滿足我們的需求,所以我們需要開發能夠滿足特定需求的頁面布局。
    ??? 我們將開發一個具有下圖風格的頁面布局,該布局中我們指定了7個區域來分別裝配portlet實現獨特的頁面風格。
    1.JPG
    一、編寫模板文件
    ??? 我們將該頁面風格名稱定義為1_2_3_2 Columns,在Liferay/html/layouttpl/custom目錄下新建1_2_3_2_columns.tpl文件,內容如下:
    <div?id="layout-content-outer-decoration">
    <div?id="layout-content-inner-decoration">
    ????
    <div?id="layout-content-container">
    ??????
    <table?border="0"?cellpadding="0"?cellspacing="0"?width="100%">
    ????????
    <tr>
    ??????????
    <td?colspan="3"?valign="top">
    ????????????$processor.processColumn(
    "column-1")
    ??????????
    </td>
    ????????
    </tr>
    ????????
    <tr>
    ??????????
    <td?width="79%"?valign="top">
    ??????????????
    <table?border="0"?cellpadding="0"?cellspacing="0"?width="100%">
    ????????????????
    <tr>
    ????????????????
    <td?width="26%"?valign="top">
    ??????????????????$processor.processColumn(
    "column-2")
    ????????????????
    </td>
    <td?class="layout-column-spacer"?width="1%">
    ????????????????????
    <div>&nbsp;</div>
    ??????????????????
    </td>
    ????????????????
    <td?width="26%"?valign="top">
    ??????????????????$processor.processColumn(
    "column-3")
    ????????????????
    </td>
    ??????????????????
    <td?class="layout-column-spacer"?width="1%">
    ????????????????????
    <div>&nbsp;</div>
    ??????????????????
    </td>
    ????????????????
    <td?width="26%"?valign="top">
    ??????????????????$processor.processColumn(
    "column-4")
    ????????????????
    </td>
    ????????????????
    </tr>
    ??????????????
    </table>
    ????????????
    </td>
    ??????????
    <td?class="layout-column-spacer"?width="1%">
    ????????????
    <div>&nbsp;</div>
    ??????????
    </td>
    ??????????
    <td?width="20%"?rowspan="2"?valign="top">
    ????????????$processor.processColumn(
    "column-5")
    ??????????
    </td>
    ????????
    </tr>
    ????????
    <tr>
    ??????????
    <td?colspan="2">
    ????????????
    <table?border="0"?cellpadding="0"?cellspacing="0"?width="100%">
    ??????????????
    <tr>
    ????????????????
    <td?width="50%"?valign="top">
    ??????????????????$processor.processColumn(
    "column-6")
    ????????????????
    </td>
    ????????????????
    <td?width="50%"?valign="top">
    ??????????????????$processor.processColumn(
    "column-7")
    ????????????????
    </td>
    ??????????????
    </tr>
    ????????????
    </table>
    ????????????
    </td>
    ????????
    </tr>
    ??????
    </table>
    ????
    </div>
    </div>
    </div>

    ??? 文件中前三行定義的<div>和最后三行</div>是固定的模板格式,從第四行開始就是我們需要定制的頁面風格的HTML格式,我們需要將輸出portlet區域的HTML語句用$processor.processColumn("column-1")來替換,“column-1”是該區域的名稱,并且每個區域的名字不能重復,這樣系統在生成模板的時候會自動生成不同的區域來存放我們指定的portlet

    二、編寫屬性文件

    ??? 我們需要在liferay-layout-templates.xml文件中配置我們自定義的頁面布局文件1_2_3_2_columns.tpl,為了和系統自帶的布局文件區分開,我們創建擴展文件liferay-layout-templates-ext.xml,在該文件中指定我們的頁面布局文件,當然也可以在liferay-layout-templates.xml文件直接增加定義。

    ?

    liferay-layout-templates-ext.xml

    <?xml?version="1.0"?>
    <!DOCTYPE?layout-templates?PUBLIC?"-//Liferay//DTD?Layout?Templates?4.0.0//EN"?"http://www.liferay.com/dtd/liferay-layout-templates_4_0_0.dtd">

    <layout-templates>
    ????
    <custom>
    ????????
    <layout-template?id="1_2_3_2_columns"?name="1-2-3-2?Columns">
    ????????????
    <template-path>/html/layouttpl/custom/1_2_3_2_columns.tpl</template-path>
    ????????
    </layout-template>
    ????
    </custom>
    </layout-templates>

    參數id定義該templateID號,name定義該templateAdd Content中顯示的名稱,template-path定義該template的路徑名。


    三、定制頁面
    ????定制好頁面風格后,需要重新啟動TOMCAT,登陸系統,進入GUEST頻道,點擊Add Content ,在Template中將會顯示我們自定義的頁面布局名稱1-2-3-2 Columns,選擇該Template,然后在頁面中添加Journal Content,按照我們自定義的布局將portlet拖拉到合適的位置,再為每個Journal Content指定Article,最后就完成了各種風格頁面的定制過程。使用這個的方法,我們可以定制各種滿足不同需求的頁面。

    主站蜘蛛池模板: 99久久免费精品视频| 一个人免费日韩不卡视频| 大学生高清一级毛片免费| 337p日本欧洲亚洲大胆精品555588 | 亚洲乱码中文论理电影| 无码专区AAAAAA免费视频| 久久国产精品亚洲综合 | 999在线视频精品免费播放观看| 亚洲国产第一页www| 日韩精品极品视频在线观看免费| 77777_亚洲午夜久久多人| 亚洲网站在线免费观看| 亚洲中文字幕乱码一区| 国产精品另类激情久久久免费| 爱情岛论坛亚洲品质自拍视频网站 | 久久综合亚洲色HEZYO国产| 在线视频网址免费播放| 亚洲高清国产AV拍精品青青草原| 无码一区二区三区免费| 亚洲人成网网址在线看| 最新中文字幕电影免费观看| 色欲aⅴ亚洲情无码AV蜜桃| 亚洲AV永久无码精品一区二区国产| 一级午夜a毛片免费视频| 国产亚洲免费的视频看| 最近2019免费中文字幕视频三| 67194在线午夜亚洲| 亚洲精品无码99在线观看| 免费a级毛片无码a∨免费软件| 激情内射亚洲一区二区三区| 免费看AV毛片一区二区三区| 一级一片免费视频播放| 亚洲欧洲日产国码久在线观看| 好男人视频社区精品免费| 一级做a爱过程免费视| 亚洲人成网站影音先锋播放| 夫妻免费无码V看片| 中文字幕不卡高清免费| 国产亚洲玖玖玖在线观看| 4338×亚洲全国最大色成网站| 6080午夜一级毛片免费看|