mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-09-27 12:39:05 +00:00
Adapt layout categories tree to com_content
This commit is contained in:
parent
8aa92f906b
commit
6372c9996a
@ -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-weblinks-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,17 +42,20 @@ 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_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->params->get('show_subcat_desc_cat') == 1) : ?>
|
||||
<?php if ($item->description) : ?>
|
||||
<div class="category-desc">
|
||||
<div class="com-content-categories__description category-desc">
|
||||
<?php echo HTMLHelper::_('content.prepare', $item->description, '', 'com_weblinks.categories'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->maxLevelcat > 1 && count($item->getChildren()) > 0) : ?>
|
||||
<div class="com-weblinks-categories__children" id="category-<?php echo $item->id; ?>" hidden>
|
||||
<?php if (count($item->getChildren()) > 0 && $this->maxLevelcat > 1) : ?>
|
||||
<div class="com-content-categories__children" id="category-<?php echo $item->id; ?>" hidden="">
|
||||
<?php
|
||||
$this->items[$item->id] = $item->getChildren();
|
||||
$this->parent = $item;
|
||||
@ -61,7 +66,9 @@ if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
Loading…
Reference in New Issue
Block a user