<?php
$partenaires = v('partenaires');

if (sizeof((array)$partenaires) > 0) {
    ?>
<div class="block">
    <h4><?php echo __('com.bloc.partenaires'); ?></h4>

    <div class="block-content">
        <div>
            <ul class="partenaires unstyled"><?php
                foreach ($partenaires as $element) {
                    ?>
                    <li><?php
                        if ($element->get_PAR_URL() != '') {
                            ?><a href="<?php echo $element->get_PAR_URL(); ?>" title="visiter le site" target="_blank"><?php
                        }
                        if ($element->get_PAR_IMG() != '') {
                            echo zk_aff_logo_part($element->get_PAR_IMG());
                        } else {
                            echo $element->get_PAR_NOM();
                        }
                        if ($element->get_PAR_URL() != '') {
                            ?></a><?php
                        }
                        ?></li><?php
                }
                ?></ul>
        </div>
    </div>
</div>
<?php
}