【问题标题】:Hide the menu area for certain components隐藏某些组件的菜单区域
【发布时间】:2011-03-24 06:35:07
【问题描述】:

我正在设计一个 joomla 组件,我想仅针对特定组件页面隐藏侧边菜单中的所有项目。 在 Joomla 中可以吗?如果是,我该怎么做?

【问题讨论】:

    标签: menu joomla components hide


    【解决方案1】:

    您可以在 index.php 中的 URL 中检查组件:

    <?php
    $option = JRequest::getCmd('option');
    if (!$option == "com_yourcomponent") {
    ?>
    <jdoc:include type="modules" name="mainmenu" style="xhtml" />
    <?php    
    }
    ?>
    

    您还可以检查其他参数,例如

    $view = JRequest::getCmd('view');
    $task = JRequest::getCmd('task');
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-06-09
      • 2011-08-12
      • 1970-01-01
      • 1970-01-01
      • 2021-04-20
      • 2021-11-26
      • 1970-01-01
      • 2010-12-07
      相关资源
      最近更新 更多