6 years ago
Topic

Hi,

In an override template I have the following DIV:

<div class="starburstintro centrarprecopromointro">
<span><span><span><p>
<?php echo $cck->getValue('preco_promocao_ht'); ?>
</span></span></span></p>
</div>

To show this: http://prntscr.com/k81mag

But if the field (preco_promocao_ht) is empty, it continues to show the highlight star (without value).

How can I do to hide if the field is empty?

Get a Book for SEBLOD
4229 Posts
Kadministrator
6 years ago
1
Level 1

you can wrap the hole block in if statement

<?php if (!empty ($cck->getValue('preco_promocao_ht') ): ?>

your above code...
<?php endif; ?>

6 years ago
0
Level 2

Hi Klas,

Many thanks for the reply! It served perfectly for what it pretended!

Get a Book for SEBLOD