mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-12-25 01:45:59 +00:00
repeat adapting to com_categories
This commit is contained in:
parent
8aa92f906b
commit
95b07343a9
@ -16,18 +16,20 @@ use Joomla\Component\Weblinks\Site\Helper\RouteHelper;
|
|||||||
|
|
||||||
if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
|
if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
|
||||||
?>
|
?>
|
||||||
<?php foreach ($this->items[$this->parent->id] as $id => $item) : ?>
|
<div class="com-content-categories__items">
|
||||||
<?php if ($this->params->get('show_empty_categories_cat') || $item->numitems || count($item->getChildren())) : ?>
|
<?php foreach ($this->items[$this->parent->id] as $id => $item) : ?>
|
||||||
<div class="com-weblinks-categories__items">
|
<?php if ($this->params->get('show_empty_categories_cat') || $item->numitems || count($item->getChildren())) : ?>
|
||||||
<h3 class="page-header item-title">
|
<div class="com-content-categories__item">
|
||||||
|
<div>
|
||||||
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($item->id, $item->language)); ?>">
|
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($item->id, $item->language)); ?>">
|
||||||
<?php echo $this->escape($item->title); ?></a>
|
<?php echo $this->escape($item->title); ?></a>
|
||||||
<?php if ($this->params->get('show_cat_num_links_cat') == 1) :?>
|
<?php if ($this->params->get('show_cat_num_links_cat') == 1) :?>
|
||||||
<span class="badge bg-info">
|
<span class="badge bg-info">
|
||||||
<?php echo Text::_('COM_WEBLINKS_NUM_ITEMS'); ?>
|
<?php echo Text::_('COM_WEBLINKS_NUM_ITEMS'); ?>
|
||||||
<?php echo $item->numitems; ?>
|
<?php echo $item->numitems; ?>
|
||||||
</span>
|
</span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
<?php if ($this->maxLevelcat > 1 && count($item->getChildren()) > 0) : ?>
|
<?php if ($this->maxLevelcat > 1 && count($item->getChildren()) > 0) : ?>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@ -40,28 +42,30 @@ if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
|
|||||||
<span class="icon-plus" aria-hidden="true"></span>
|
<span class="icon-plus" aria-hidden="true"></span>
|
||||||
</button>
|
</button>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</h3>
|
<?php if ($this->params->get('show_subcat_desc_cat') == 1) : ?>
|
||||||
<?php if ($this->params->get('show_subcat_desc_cat') == 1) : ?>
|
<?php if ($item->description) : ?>
|
||||||
<?php if ($item->description) : ?>
|
<div class="category-desc">
|
||||||
<div class="category-desc">
|
<?php echo HTMLHelper::_('content.prepare', $item->description, '', 'com_weblinks.categories'); ?>
|
||||||
<?php echo HTMLHelper::_('content.prepare', $item->description, '', 'com_weblinks.categories'); ?>
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($this->params->get('show_description_image') && $item->getParams()->get('image')) : ?>
|
||||||
|
<img src="<?php echo $item->getParams()->get('image'); ?>" alt="<?php echo htmlspecialchars($item->getParams()->get('image_alt'), ENT_COMPAT, 'UTF-8'); ?>">
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($this->maxLevelcat > 1 && count($item->getChildren()) > 0) : ?>
|
||||||
|
<div class="com-content-categories__children" id="category-<?php echo $item->id; ?>" hidden>
|
||||||
|
<?php
|
||||||
|
$this->items[$item->id] = $item->getChildren();
|
||||||
|
$this->parent = $item;
|
||||||
|
$this->maxLevelcat--;
|
||||||
|
echo $this->loadTemplate('items');
|
||||||
|
$this->parent = $item->getParent();
|
||||||
|
$this->maxLevelcat++;
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
<?php if ($this->maxLevelcat > 1 && count($item->getChildren()) > 0) : ?>
|
</div>
|
||||||
<div class="com-weblinks-categories__children" id="category-<?php echo $item->id; ?>" hidden>
|
|
||||||
<?php
|
|
||||||
$this->items[$item->id] = $item->getChildren();
|
|
||||||
$this->parent = $item;
|
|
||||||
$this->maxLevelcat--;
|
|
||||||
echo $this->loadTemplate('items');
|
|
||||||
$this->parent = $item->getParent();
|
|
||||||
$this->maxLevelcat++;
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user