joomla中jdoc:include的介紹

 

jdoc:include

<jdoc:include type="component" />
<jdoc:include type="head" />
<jdoc:include type="installation" />
<jdoc:include type="message" />
<jdoc:include type="module" name="breadcrumbs" />
<jdoc:include type="module" name="menu" />
<jdoc:include type="module" name="submenu" style="rounded" id="submenu-box" />
<jdoc:include type="modules" name="debug" />
<jdoc:include type="modules" name="icon" />
<jdoc:include type="modules" name="left" style="rounded" />
<jdoc:include type="modules" name="left" style="xhtml" />
<jdoc:include type="modules" name="right" style="xhtml" />
<jdoc:include type="modules" name="status" />
<jdoc:include type="modules" name="syndicate" />
<jdoc:include type="modules" name="title" />
<jdoc:include type="modules" name="toolbar" />
<jdoc:include type="modules" name="top" />
<jdoc:include type="modules" name="top" style="xhtml" />
<jdoc:include type="modules" name="user1" style="xhtml" />
<jdoc:include type="modules" name="user2" style="xhtml" />
<jdoc:include type="modules" name="user3" />
<jdoc:include type="modules" name="user4" />

type 屬性

jdoc:include 元素中的type屬性指定要渲染的內容類型,屬性值可以是component,head,installation,message,module,modules


component
頁面內容主輸出部分,在模板頁面<body>元素中應該只出現一次。

head
填充當前頁的style, script,meta的相關元素,應該在模板的<head>元素中只出現一次。

installation
僅僅在安裝模板中有用,在前臺和後臺的模板中沒有用到,某種程度上與 component類型相似,渲染安裝步驟中中的一個頁面主內容。

message
在模板的<body>元素中只出現一次,填充系統或者報錯信息。

module
渲染由name屬性指定的單一模塊,模塊必須是發佈的並且當前用戶有權訪問,還可以有layout以及controller屬性。

modules
渲染模板中所有指定名稱的模塊,模塊必須是發佈的並且當前用戶有權訪問,還可以有layout以及controller屬性。


style 屬性

對於module 和modules 類型,style是一個可選屬性,這一屬性指定了模塊被渲染風格,如果沒指定style,默認是none

/templates/system/html/modules.php 聲明瞭標準的style:table,horz,xhtml,rounded,outline
模板設計者可以在以下文件自定義style
/user-template/html/modules.php.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章