* @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Multilanguage; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; use Joomla\CMS\Session\Session; $app = Factory::getApplication(); if ($app->isClient('site')) { Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->document->getWebAssetManager(); $wa->useScript('com_menus.admin-items-modal')->useScript('modal-content-select'); // @todo: Use of Function and Editor is deprecated and should be removed in 6.0. It stays only for backward compatibility. $function = $app->getInput()->get('function', 'jSelectMenuItem', 'cmd'); $editor = $app->getInput()->getCmd('editor', ''); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $link = 'index.php?option=com_menus&view=items&layout=modal&tmpl=component&' . Session::getFormToken() . '=1'; $multilang = Multilanguage::isEnabled(); if (!empty($editor)) { // This view is used also in com_menus. Load the xtd script only if the editor is set! $this->document->addScriptOptions('xtd-menus', ['editor' => $editor]); $onclick = "jSelectMenuItem"; $link = 'index.php?option=com_menus&view=items&layout=modal&tmpl=component&editor=' . $editor . '&' . Session::getFormToken() . '=1'; } ?>
$this, 'options' => ['selectorFieldName' => 'menutype']]); ?> items)) : ?>
items as $i => $item) : ?> language && $multilang) { if ($item->language !== '*') { $language = $item->language; } } $link = 'index.php?Itemid=' . $item->id; $itemHtml = '' . $item->title . ''; $attribs = 'data-content-select data-content-type="com_menus.item"' . 'data-function="' . $this->escape($function) . '"' . ' data-id="' . $item->id . '"' . ' data-title="' . $this->escape($item->title) . '"' . ' data-uri="' . $this->escape($link) . '"' . ' data-language="' . $this->escape($language) . '"' . ' data-html="' . $this->escape($itemHtml) . '"'; ?>
, ,
published, $i, 'items.', false, 'cb', $item->publish_up, $item->publish_down); ?> $item->level]); ?> > escape($item->title); ?> params); ?>
note)) : ?> escape($item->alias)); ?> escape($item->alias), $this->escape($item->note)); ?>
escape($item->item_type); ?>
type === 'component' && !$item->enabled) : ?>
enabled === null ? 'JLIB_APPLICATION_ERROR_COMPONENT_NOT_FOUND' : 'COM_MENUS_LABEL_DISABLED'); ?>
escape($item->menutype_title); ?> type == 'component') : ?> language == '*' || $item->home == '0') : ?> home, $i, 'items.', ($item->language != '*' || !$item->home) && false && !$item->protected, 'cb', null, 'home', 'circle'); ?> language_image) : ?> language_image . '.gif', $item->language_title, ['title' => $item->language_title], true); ?> language; ?> escape($item->access_level); ?> language == '') : ?> language == '*') : ?> id; ?>
pagination->getListFooter(); ?>