| Current Path : /home/helpink/www/modules/mod_article_dgrid/ |
| Current File : /home/helpink/www/modules/mod_article_dgrid/mod_article_dgrid.php |
<?php defined('_JEXEC') or die;
/*
* @package mod_uk_grid
* @license GNU General Public License version 3 or later; see http://www.gnu.org/licenses/gpl-3.0.txt
*/
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\Component\Tags\Site\Helpers\TagsHelperRoute;
$vars = [
'grid_class', 'item_class','img_popup','item_style','margin_class', 'first_column_class', 'height_match', 'height_match_class',
'grid', 'grid_divider', 'grid_center','link_popup','show_tags','link_target', 'cols', 'cols_all', 'cols_s', 'cols_m', 'cols_l', 'cols_xl', 'masonry',
'items', 'showLoadMore', 'initCount', 'loadCount'
];
foreach ($vars as $var) {
$$var = $params->get($var);
}
$grid_params = [];
if ($margin_class) $grid_params[] = 'margin_class:.' . $margin_class;
if ($first_column_class) $first_column_class[] = 'margin_class:.' . $first_column_class;
if ($masonry) $grid_params[] = 'masonry:true';
$grid_params = $grid_params ? '="' . implode(';', $grid_params) . '"' : '';
$hm_param = '';
if ((int)$height_match && $height_match_class) $hm_param = ' uk-height-match="target:' . $height_match_class . '"';
$classes = [];
if ($grid != '') {
$classes[] = $grid;
if ((int)$grid_divider) $classes[] = 'uk-grid-divider';
if ((int)$grid_center) $classes[] = 'uk-flex-center';
}
if ((int)$cols) {
$classes[] = $cols_all;
$classes[] = $cols_s;
$classes[] = $cols_m;
$classes[] = $cols_l;
$classes[] = $cols_xl;
}
if ((int)$height_match && !$height_match_class) $classes[] = 'uk-grid-match';
$classes = $classes ? ' ' . implode(' ', $classes) : '';
// Include the news functions only once
require_once (dirname(__FILE__).'/helper.php');
$list = ModArticleDgridHelper::getList($params);
$tagsList = ModArticleDgridHelper::getTagsList($list);
require ModuleHelper::getLayoutPath('mod_article_dgrid', $params->get('layout', 'default'));