<?php
defined ('_JEXEC') or die('Restricted access');
?>
<?php
$attribute = $this->attribute_cursor;
$attributeName = '_ef_'.$attribute->alias;
?>
<?php if (!empty($this->item_cursor->$attributeName)) { ?>
<?php if ($attributeName=='_ef_engine_type' || $attributeName=='_ef_engine_size'){ ?>
<a>گروه فیلد 1</a>
<tr class="djc_attribute djc<?php echo $attributeName; ?>">
<td class="djc_label">
<?php
if ($attribute->imagelabel != '') {
echo '<img class="djc_attribute-imglabel" alt="'.htmlspecialchars($attribute->name).'" src="'.JURI::base().$attribute->imagelabel.'" />';
}
else {
echo '<span class="djc_attribute-label">'.htmlspecialchars($attribute->name).'</span>';
}
?>
</td>
<td class="djc_value">
<?php
if (is_array($this->item_cursor->$attributeName)){
$this->item_cursor->$attributeName = implode(', ', $this->item_cursor->$attributeName);
}
if ($attribute->type == 'textarea' || $attribute->type == 'text'){
$value = nl2br(htmlspecialchars($this->item_cursor->$attributeName));
// convert URLs
$value = preg_replace('#([\w]+://)([^\s()<>]+)#iS', '<a target="_blank" href="$1$2">$2</a>', $value);
// convert emails
$value = preg_replace('#([\w.-]+(\+[\w.-]+)*@[\w.-]+)#i', '<a target="_blank" href="mailto:$1">$1</a>', $value);
echo $value;
}
else if ($attribute->type == 'html') {
echo JHTML::_('content.prepare', $this->item_cursor->$attributeName, $this->params, 'com_djcatalog2.item.attributes');
}
else if ($attribute->type == 'calendar') {
echo JHtml::_('date', $this->item_cursor->$attributeName, JText::_('DATE_FORMAT_LC4'));
}
else {
echo htmlspecialchars($this->item_cursor->$attributeName);
}
?>
</td>
</tr>
<?php } ?>
<?php } ?>
[/code]