2016-06-17 41 views
-1

我有Joomla!的問題。有沒有辦法在特定類別中設置模塊,但在文章中沒有? (所以它會顯示在類別頁面上,但不會顯示在該類別或子類別的文章中) 我在之前的作品中遇到了相反的問題,並在index.php中使用了一些cat id和php來修復它,但是我不'不知道如何達到這個效果,是否有人遇到同樣的問題並修復它?Joomla模塊在文章中可見,但不在類別

Regards

回答

1

創建模板/ your_template中/ HTML /文件夾中的分類視圖的覆蓋和使用覆蓋文件中下面的代碼:

<?php 
$document = JFactory::getDocument(); 
$renderer = $document->loadRenderer('modules'); 
$position = "YOURPOSITIONNAME"; 
$options = array('style' => 'raw'); 
echo $renderer->render($position, $options, null); 
?> 
相關問題