| Current Path : /home/helpink/www/components/com_jbusinessdirectory/views/offer/tmpl/ |
| Current File : /home/helpink/www/components/com_jbusinessdirectory/views/offer/tmpl/offer_attributes.php |
<?php
/**
* @package J-BusinessDirectory
*
* @author CMSJunkie http://www.cmsjunkie.com/
* @copyright Copyright (C) 2007 - 2022 CMSJunkie. All rights reserved.
* @license https://www.gnu.org/licenses/agpl-3.0.en.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php
if(!empty($this->offerAttributes)) {
$attributes = JBusinessUtil::arrangeAttributesByGroup($this->offerAttributes);
$ungrouped = array();
if(count($attributes) > 1) { ?>
<div class="item-section">
<div class='attribute-groups-container'>
<?php foreach($attributes as $group => $values) { ?>
<?php if($group != 'ungrouped') {
$renderedContent = AttributeService::renderAttributesFront($values, false, array());
if(!empty($renderedContent)) { ?>
<div class='attribute-group'>
<h4><?php echo $group ?></h4>
<hr/>
<?php
echo $renderedContent;
?>
</div>
<?php } ?>
<?php } else {
$ungrouped = $values;
} ?>
<?php } ?>
</div>
<?php
$renderedContent = AttributeService::renderAttributesFront($ungrouped, false, array());
echo $renderedContent;
}
else {?>
<div class="item-section">
<div class="custom-attributes">
<?php
$renderedContent = AttributeService::renderAttributesFront($attributes['ungrouped'], false, array());
echo $renderedContent;
?>
</div>
</div>
<?php
}
}
?>