0
<div class="product-fields">

<?php
$custom_title = null;
foreach ($this->product->customfieldsSorted['normal'] as $field) { // I set the position to normal

if ( $field->is_hidden )
continue;
if ($field->display) {
?>

<?php if ($field->custom_title != $custom_title) { ?>

 <div class="product-field product-field-type-<?php echo $field->custom_title ?><?php //echo $field->field_type ?>">

<div class="product-fields-title"><?php echo JText::_($field->custom_title); ?></div>

<?php
if ($field->custom_tip)
 echo JHTML::tooltip($field->custom_tip, JText::_($field->custom_title), 'tooltip.png');
}
?>
<span class="product-field-display"><?php echo $field->display ?></span>
<!--<span class="product-field-desc"><?php echo $field->custom_field_desc ?></span>-->

  <?php $custom_title = $field->custom_title; }

}
echo "<br /><br />&raquo;171717&raquo;</div>";

?>

我想在循环和循环中有一个更接近的 DIV

<span class="product-field-display"><?php echo $field->display ?></span>

但我不知道放在哪里

echo "<br /><br />&raquo;171717&raquo;</div>";
4

1 回答 1

0

正确关闭 Div 标签:

<?php
$custom_title = null;
foreach ($this->product->customfieldsSorted['normal'] as $field) { // I set the position to normal

if ( $field->is_hidden )
continue;
if ($field->display) {
?>

<?php if ($field->custom_title != $custom_title) { ?>

 <div class="product-field product-field-type-<?php echo $field->custom_title; //echo $field->field_type ?>">

<div class="product-fields-title"><?php echo JText::_($field->custom_title); ?></div>

<?php
if ($field->custom_tip)
 echo JHTML::tooltip($field->custom_tip, JText::_($field->custom_title), 'tooltip.png');
}
?>
<span class="product-field-display"><?php echo $field->display ?></span>
<!--<span class="product-field-desc"><?php echo $field->custom_field_desc ?></span>-->

  <?php $custom_title = $field->custom_title; }
?>
</div>
<?php
}
echo "<br /><br />&raquo;171717&raquo;";
?>
</div>
于 2013-07-19T12:43:13.233 回答