Skip to content

Commit

Permalink
Merge pull request #172 from ankush-maherwal/latesttjfields
Browse files Browse the repository at this point in the history
Bug #166 fix: Cluster Filters on UCM list view
  • Loading branch information
ankush-maherwal authored Aug 20, 2019
2 parents d8545cc + 1b5fa4d commit 49f8923
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions site/layouts/fields/cluster.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* @package TJ-Fields
* @author TechJoomla <extensions@techjoomla.com>
* @copyright Copyright (c) 2009-2019 TechJoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// No direct access
defined('_JEXEC') or die('Restricted access');

if (!key_exists('field', $displayData))
{
return;
}

$field = $displayData['field'];

if ($field->value)
{
JLoader::import("/components/com_cluster/includes/cluster", JPATH_ADMINISTRATOR);
$clusterModel = ClusterFactory::model('Cluster', array('ignore_request' => true));
$cluster = $clusterModel->getItem($field->value);
echo $cluster->name;
}
else
{
echo "-";
}

0 comments on commit 49f8923

Please sign in to comment.