2012-09-11 21 views
3

有沒有什麼方法可以在模板中設置<jdoc:include type="component" />的輸出風格,而無需修改Joomla核心功能?如何在模板中設置<jdoc:include type =「component」/>的輸出風格?

具體而言,我想添加一個ID爲article的div來包含文章,而不是其他內容。現在,在我的主題中,有一個類item-page的div,其中包括文章,評級,行動甚至評論框(添加了外部插件)。

所以,我想新的模板是這樣的:

<div class="item-page> 
    <!-- something here --> 
    <div id="article"> 
     <!-- The article and nothing else here --> 
    </div> 
    <!-- comments and whatever may be here --> 
</div> 

回答

3

使用佈局覆蓋。

轉到您要修改的佈局,並複製到您的模板的html文件夾的視圖的tmpl文件夾...所以說文章: 得到/components/views/article/default.php,並複製到 templates/[yourtemplate]/html/com_content/article/default.php 修改該文件,你希望。

這將默認在使用該模板的所有頁面上更改它。

相關問題