<?php
/**
 * ------------------------------------------------------------------------
 * ja_trip_tpl
 * ------------------------------------------------------------------------
 * Copyright (C) 2004-2018 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
 * @license - Copyrighted Commercial Software
 * Author: J.O.O.M Solutions Co., Ltd
 * Websites:  http://www.joomlart.com -  http://www.joomlancers.com
 * This file may not be redistributed in whole or significant part.
 * ------------------------------------------------------------------------
 */

// no direct access
defined('_JEXEC') or die;

use Joomla\CMS\Router\Route;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\Component\Content\Site\Helper\RouteHelper;

if (version_compare(JVERSION, '4.0', '<')){
	$url_ = ContentHelperRoute::getCategoryRoute($params->get('parent', 'root'));
}else{
	$url_ = RouteHelper::getCategoryRoute($params->get('parent', 'root'));
}

$moduleclass_sfx = $params->get('moduleclass_sfx','');

?>
<div class="categories-tour">
<ul class="categories-tour-inner <?php echo $moduleclass_sfx; ?>">

    <li <?php if ($_SERVER['PHP_SELF'] == Route::_($url_)) echo ' class="active"';?>>
        <a class="heading-link" href="<?php echo Route::_($url_); ?>">
			<?php echo Text::_('TPL_ARTICLES_CATEGORIES_ALL');?>
        </a>
    </li>

	<?php
	require ModuleHelper::getLayoutPath('mod_articles_categories', $params->get('layout', 'tour').'_items');
	?></ul>
</div>
