Skip to content

Commit

Permalink
Bug #166 fix: Cluster Filters on UCM list view
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush-maherwal committed Aug 20, 2019
1 parent eab22a3 commit 1b5fa4d
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 <[email protected]>
* @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 1b5fa4d

Please sign in to comment.