<?php
/**
 * @package DJ-Catalog2
 * @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
 * @license http://www.gnu.org/licenses GNU/GPL
 * @author url: http://dj-extensions.com
 * @author email contact@dj-extensions.com
 */

defined ('_JEXEC') or die('Restricted access');
?>
<?php

$item = $item_cursor;

$attribute = $attribute_cursor;
$attributeName = '_ef_'.$attribute->alias;

?>
<?php if (isset($item_cursor->$attributeName) && (is_array($item_cursor->$attributeName) || (is_scalar($item_cursor->$attributeName) && trim($item_cursor->$attributeName) != ''))) { ?>
	<tr class="djc_attribute djc<?php echo $attributeName; ?>">
		<td class="djc_label">
			<?php
			$layout = new JLayoutFile('com_djcatalog2.attributelabel', DJCatalog2ThemeHelper::getLayoutBasePath(), array('component'=> 'com_djcatalog2'));
			echo $layout->render(array('attribute' => $attribute, 'params' => $params));
			?>
		</td>
		<td  class="djc_value">
			<?php
			$layout = new JLayoutFile('com_djcatalog2.attributevalue', DJCatalog2ThemeHelper::getLayoutBasePath(), array('component'=> 'com_djcatalog2'));
			echo $layout->render(array('item' => $item, 'attribute' => $attribute, 'params' => $params));
			?>
		</td>
	</tr>
<?php } ?>