【问题标题】:Joomla module visible in article but not in categoryJoomla 模块在文章中可见但在类别中不可见
【发布时间】:2016-06-18 17:14:50
【问题描述】:

我对 Joomla! 有疑问。有没有办法将模块设置为在某个类别中可见但在文章中不可见? (因此它将显示在类别页面上,但不会显示在该类别或子类别的文章中) 之前的作品遇到了相反的问题,在index.php中用一些cat id和php修复了,但是不知道怎么实现这个效果,有没有人遇到同样的问题并修复了?

问候

【问题讨论】:

    标签: php css joomla joomla3.0


    【解决方案1】:

    在 template/your_template/html/ 文件夹中创建类别视图的覆盖,并在覆盖文件中使用以下代码:

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

    【讨论】:

      【解决方案2】:

      这有用吗? 我不在 Joomla 上开发,但我找到了这个链接。

      http://www.inmotionhosting.com/support/edu/joomla-25/extensions/modules-on-homepage

      【讨论】:

        【解决方案3】:

        为什么不使用高级模块管理器,它有几个满足您要求的高级选项https://www.regularlabs.com/extensions/advancedmodulemanager#free-vs-pro

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2015-02-21
          • 1970-01-01
          • 2015-11-19
          • 1970-01-01
          • 1970-01-01
          • 2021-02-15
          • 2012-05-30
          • 2017-09-21
          相关资源
          最近更新 更多