[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/layouts/joomla/sidebars/ -> submenu.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  Layout
   6   *
   7   * @copyright   (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  defined('_JEXEC') or die;
  12  
  13  use Joomla\CMS\HTML\HTMLHelper;
  14  use Joomla\CMS\Language\Text;
  15  use Joomla\Filter\OutputFilter;
  16  
  17  HTMLHelper::_('behavior.core');
  18  ?>
  19  <?php if ($displayData->displayMenu || $displayData->displayFilters) : ?>
  20  <div id="j-toggle-sidebar-wrapper">
  21      <div id="sidebar" class="sidebar">
  22          <button class="btn btn-sm btn-secondary my-2 options-menu d-md-none" type="button" data-bs-toggle="collapse" data-bs-target=".sidebar-nav" aria-controls="sidebar-nav" aria-expanded="false" aria-label="<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>">
  23              <span class="icon-align-justify" aria-hidden="true"></span>
  24              <?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>
  25          </button>
  26          <div class="sidebar-nav">
  27              <?php if ($displayData->displayMenu) : ?>
  28              <ul class="nav flex-column">
  29                  <?php foreach ($displayData->list as $item) :
  30                      if (isset($item[2]) && $item[2] == 1) : ?>
  31                      <li class="active">
  32                      <?php else : ?>
  33                      <li>
  34                      <?php endif;
  35                      if ($displayData->hide) : ?>
  36                      <a class="nolink"><?php echo $item[0]; ?></a>
  37                      <?php else :
  38                          if ($item[1] !== '') : ?>
  39                          <a href="<?php echo OutputFilter::ampReplace($item[1]); ?>"><?php echo $item[0]; ?></a>
  40                          <?php else : ?>
  41                              <?php echo $item[0]; ?>
  42                          <?php endif;
  43                      endif; ?>
  44                  </li>
  45                  <?php endforeach; ?>
  46              </ul>
  47              <?php endif; ?>
  48              <?php if ($displayData->displayMenu && $displayData->displayFilters) : ?>
  49              <hr>
  50              <?php endif; ?>
  51              <?php if ($displayData->displayFilters) : ?>
  52              <div class="filter-select d-none d-md-block">
  53                  <h4 class="page-header"><?php echo Text::_('JSEARCH_FILTER_LABEL'); ?></h4>
  54                  <?php foreach ($displayData->filters as $filter) : ?>
  55                      <label for="<?php echo $filter['name']; ?>" class="visually-hidden"><?php echo $filter['label']; ?></label>
  56                      <select name="<?php echo $filter['name']; ?>" id="<?php echo $filter['name']; ?>" class="form-select" onchange="this.form.submit()">
  57                          <?php if (!$filter['noDefault']) : ?>
  58                              <option value=""><?php echo $filter['label']; ?></option>
  59                          <?php endif; ?>
  60                          <?php echo $filter['options']; ?>
  61                      </select>
  62                      <hr>
  63                  <?php endforeach; ?>
  64              </div>
  65              <?php endif; ?>
  66          </div>
  67      </div>
  68      <div id="j-toggle-sidebar"></div>
  69  </div>
  70  <?php endif; ?>


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer