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,10 +16,11 @@ use Joomla\Component\Weblinks\Site\Helper\RouteHelper;
|
||||
|
||||
if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
|
||||
?>
|
||||
<div class="com-content-categories__items">
|
||||
<?php foreach ($this->items[$this->parent->id] as $id => $item) : ?>
|
||||
<?php if ($this->params->get('show_empty_categories_cat') || $item->numitems || count($item->getChildren())) : ?>
|
||||
<div class="com-weblinks-categories__items">
|
||||
<h3 class="page-header item-title">
|
||||
<div class="com-content-categories__item">
|
||||
<div>
|
||||
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($item->id, $item->language)); ?>">
|
||||
<?php echo $this->escape($item->title); ?></a>
|
||||
<?php if ($this->params->get('show_cat_num_links_cat') == 1) :?>
|
||||
@ -28,6 +29,7 @@ if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
|
||||
<?php echo $item->numitems; ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ($this->maxLevelcat > 1 && count($item->getChildren()) > 0) : ?>
|
||||
<button
|
||||
type="button"
|
||||
@ -40,7 +42,6 @@ if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
|
||||
<span class="icon-plus" aria-hidden="true"></span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</h3>
|
||||
<?php if ($this->params->get('show_subcat_desc_cat') == 1) : ?>
|
||||
<?php if ($item->description) : ?>
|
||||
<div class="category-desc">
|
||||
@ -48,9 +49,11 @@ if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
|
||||
</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-weblinks-categories__children" id="category-<?php echo $item->id; ?>" hidden>
|
||||
<div class="com-content-categories__children" id="category-<?php echo $item->id; ?>" hidden>
|
||||
<?php
|
||||
$this->items[$item->id] = $item->getChildren();
|
||||
$this->parent = $item;
|
||||
@ -63,5 +66,6 @@ if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
Loading…
Reference in New Issue
Block a user