Sindbad~EG File Manager
<?php
/**
* @package RSDirectory!
* @copyright (C) 2013-2021 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/
// No direct access.
defined('_JEXEC') or die('Restricted access');
// Sort current categories based on settings
$helper->sortCategories($categories);
?>
<ul class="<?php echo $class; ?>">
<?php foreach ($categories as $category) {
// If only categories with entries are shown, skip this
if ($only_with_entries && !$helper->numEntriesCategories($category->id)) {
continue;
}
// If this category is not selected, skip this
if ($selected_categories && !in_array($category->id, $selected_categories)) {
continue;
}
// Get category parameters
$category_params = $category->getParams();
// Flag to determine if category has children
$has_children = $category->hasChildren();
// URL for the category link
$category_url = RSDirectoryRoute::getCategoryEntriesURL($category->id, $category->title, $custom_item_id);
// Category thumbnail path
$category_thumb = $helper->getThumbnail($category_params->get('thumbnail'));
// Check if a thumbnail can be displayed for the current category
$has_thumbnail = $show_thumbnails && $category_thumb;
// Number of entries for this category
$num_items = $helper->numEntriesCategories($category->id);
?>
<li <?php if ($has_children) { ?>class="rsdir-has-subcategories"<?php } ?>>
<a href="<?php echo $category_url; ?>" title="<?php echo $helper->escape($category->title); ?>" <?php if ($has_thumbnail) { ?>class="has-img"<?php } ?> <?php if ($category_params->get('color')) { ?>style="background-color: <?php echo $helper->escape($category_params->get('color')); ?>;"<?php } ?>>
<?php if ($has_thumbnail) { ?>
<img src="<?php echo $category_thumb; ?>" alt="<?php echo $helper->escape($category->title); ?>"/>
<?php } ?>
<?php if ($category_params->get('icon')) { ?>
<i class="<?php echo $helper->escape($category_params->get('icon')); ?>"></i>
<?php } ?>
<?php echo $helper->escape($category->title); ?>
<?php if ($show_number_entries) { ?>
<span class="rsdir-entries-number"><?php echo $num_items; ?></span>
<?php } ?>
</a>
<?php
if ($has_children) {
// Set our categories variable to grab the subcategories so we can include by recursion
$categories = $category->getChildren();
// Class for nested <ul>
$class = 'rsdir-subcategories-list';
include JModuleHelper::getLayoutPath('mod_rsdirectory_categories', 'default_categories');
}
?>
</li>
<?php
}
?>
</ul>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists