欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

Liferay Portal學習筆記(三):自定義頁面布局

系統 1698 0
?????? 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 >

??? 文件中前三行定義的

和最后三行
是固定的模板格式,從第四行開始就是我們需要定制的頁面風格的 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 文件直接增加定義。

<o:p> ? </o:p>

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 定義該 template ID 號, name 定義該 template Add Content 中顯示的名稱, template-path 定義該 template 的路徑名。


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

Liferay Portal學習筆記(三):自定義頁面布局Template


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 乳罩双性受给攻喂奶高h | 久久婷婷色 | 一区二区三区在线观看视频 | 日韩毛片欧美一级a网站 | 五月婷婷激情第五季 | 日韩 欧美 亚洲国产 | 国产亚洲欧美一区二区 | 久久99久久 | 精品在线一区二区三区 | 国产日韩精品视频 | 黄网站免费在线观看 | 欧美 video | 国语一级毛片 | 亚洲国产精品成人 | 老头天天吃我奶躁我午夜视频 | 久久精品男人的天堂 | 99pao成人国产永久免费视频 | 羞羞的动漫在线观看 | 国产美女高潮 | 久久y| 97国产精品 | 美女下面直流白浆视频 | 噜噜噜噜精品视频在线观看 | 久久久久久免费免费 | 看亚洲a级一级毛片 | 亚洲国产日韩在线观看 | 精品毛片 | 久久久久国产一区二区三区 | 国产成人在线免费视频 | 日产精品乱码卡一卡2卡三 久久99精品久久久久久综合 | 二区三区偷拍浴室洗澡视频 | 国产小视频免费在线观看 | 黄色av免费看 | 免费久久精品国产片香蕉 | 神秘电影91 | 日韩中文一区二区三区 | 亚洲一区中文字幕在线观看 | 91网页在线观看 | 国产精品视频二区不卡 | 欧美一级毛片欧美大尺度一级毛片 | 中文字幕一区在线观看视频 |