Problemino sul php, vorrei far uscire soltanto alcuni dei campi definiti extra fields (sono quelli creati dall'amministratore), il codice php che gestisce la scheda visualizzata è questo:
// no direct access
defined('_JEXEC') or die('Restricted access');
?>
<div class="btp">
<a class="link-arrow" style="float:right;margin-top:-65px;" href="<?php echo JRoute::_(BT_PropertyHelperRoute::getCategoryRoute(0)); ?>"><?php echo JText::_('MOD_BT_PROPERTY_SHOWCASE_ALL_PROPERTIES'); ?>[/url]
<section id="price-drop" class="block">
<div class="row">
<div class="owl-carousel price-drop-carousel">
<?php foreach ($list as $port) : ?>
<div class="col-md-12">
<div class="property">
<figure class="tag status"><?php echo Bt_propertyHelper::statusTitle($port->status); ?></figure>
<a href="<?php echo JRoute::_(BT_PropertyHelperRoute::getPropertyRoute($port->id . ':' . $port->alias,$port->category_id . ':' . $port->category_alias,$port->status));?>">
<div class="property-image">
<img alt="" src="<?php echo modBtPropertyShowcaseHelper::getItemImage($params, $port); ?>">
<>
<div class="overlay">
<div class="info">
<div class="tag price"><?php echo Bt_propertyHelper::formatPrice($port->price); ?><>
<h3><?php echo $port->title; ?></h3>
<figure><?php echo $port->address; ?></figure>
<>
<?php if($params->get('show_ex', 1)){?>
<ul class="additional-info">
<?php
foreach ($port->extra_fields as $ex) {
if ($params->get('show_ex', 1) != 'featured_only' || $ex->featured) {
?>
<li>
<span><?php echo JText::_($ex->name); ?>:</span><?php echo Bt_propertyHelper::extrafieldHTML($ex); ?>
</li>
<?php }
}?>
</ul>
<?php }?>
<div class="baths">
<?php echo $port->baths; ?>
<>
<div class="beds">
<?php echo $port->beds; ?>
[/size][size=78%]<>[/size][/size][/color]
<div class="description">
<?php echo $port->full_description; ?>
<>
<>
[/url]
<><!-- /.property -->
<>
<?php endforeach; ?>
<>
<>
</section>
<>
avevo aggiunto le righe in blu pensando di richiamare quei campi, ma ovviamente non sono definiti così nel data base, sicuramente dovrei scrivere una cosa tipo questa
<?php if($params->get('show_ex', 1)){?>
<ul class="additional-info">
<?php
foreach ($port->extra_fields as $ex) {
if ($params->get('show_ex', 1) != 'featured_only' || $ex->featured) {
?>
<li>
<span><?php echo JText::_($ex->name); ?>:</span><?php echo Bt_propertyHelper::extrafieldHTML($ex); ?>
</li>
<?php }
}?>
</ul>
<?php }?>
ma dicendogli di selezionare soltanto i due campi in questione.
Potreste dirmi come fare la modifica? Spero si capisca quello che voglio fare.
Grazie.